Selenium - POM mode, unittest framework

1, POM mode POM structure: Project name file: common folder: base.py file: secondary encapsulation of selenium: 1. Open browser 2. Open address 3. Element positioning 4. Element operation page folder: 1. Encapsulate each page of the project 2.page folder: divide the page into three layers Presenta ...

Added by micah1701 on Thu, 13 Feb 2020 23:44:15 +0200

In Python, ddt is used to drive data, execute use cases in batches, and modify ddt code

1. What is data-driven? What are the benefits of using data-driven? Use case execution is driven by data. Every test case has the same code except for different test data. In order to use case execution in batch, we will use the idea of data-driven to execute test cases in batch; Benefits: Batch execution of test cases improves the efficiency o ...

Added by reecec on Tue, 07 Jan 2020 00:57:50 +0200

Splicing of Chinese path and English path in python

General statement: This paper introduces several common ways of splicing Chinese and English paths, and several pits. If you don't have time to see the pit, just jump to the end Common errors: 1. Splice by "{} {}" {} ". format() path1 = "D:/Chinese/" path2 = "test/" def test_road(path1,path2): path = "{}{ ...

Added by aspguy on Tue, 31 Dec 2019 22:01:52 +0200

05 Basic data types and built-in methods

[TOC] A primer Data types are used to record the state of things, and the state of things is constantly changing (e.g., an increase in a person's age (operation int type), modification of a single person's name (operation str type), addition of students to the student list (operation list type), etc.). This means that we need to frequently ope ...

Added by gclx on Tue, 24 Dec 2019 02:11:39 +0200

[Beginner to Taurus Road 7] Switch Background Management for Multiple User Account Logins

Project Requirements Implement multiple accounts Project implementation #include <stdio.h> #include <string.h> int main(void) { // Define variables to represent user names and passwords char name[32]; char password[16]; FILE *file; //Defines a file pointer variable whose name is file char line[128]; char n ...

Added by Yaak on Sat, 21 Dec 2019 00:18:25 +0200

LeetCode string - valid alphabetic words

Effective alphabetic words Given two strings s and t, write a function to determine whether t is an alphabetic word of s. Example 1: Input: S = anagram, t = nagaram Output: true Example 2: Input: S = rat, t = car Output: false Explain: You can assume that the string contains only lowercase letters. Advance: What if the inp ...

Added by google_man2000 on Thu, 19 Dec 2019 22:22:59 +0200

Bean crawler (get ID from play name)

Suppose you only know the list of play names ['northwest wolf of war', 'martial arts biography'], and want to crawl its Douban information. First of all, I need to know its Douban ID, so that I can better connect to the information page of the play.   1. Load package # coding: utf-8 import urllib.request import pandas as pd ...

Added by semsem on Fri, 13 Dec 2019 20:24:48 +0200

Find strings (and modify, sort, insert, delete, etc.) - assembly language

A group of strings are data,name,time,file,code,path,user,exit,quit,text. Please write a program to input a string of 4 characters from the keyboard. If there is a string, change it to disk and display the result on the display. DATAS SEGMENT STRING0 DB 'data',0AH,0DH STRING1 DB 'name',0AH,0DH STRING2 DB ...

Added by Sturm on Tue, 10 Dec 2019 04:39:23 +0200

Work common view block device command lsblk details

The lsblk command can list information about all available block devices, such as logical disks, while df -h looks at file system level information. Lsblk command is included in util Linux package. Install util Linux package from yum, and util Linux contains multiple command tools. [root@localhost ~]# df -h Filesystem Size Used ...

Added by trukfixer on Sat, 07 Dec 2019 09:03:59 +0200

C pointer principle - AT&T assembly

The standard assembler of Linux platform is GAS, which is the background assembly tool relied on by GCC, and is usually included in binutils package,--gstabs tells the assembler to add a symbol table to the generated object code. First, we complete the assembly:as -gstabs -o hello.o hello.sThe target code generated by assembler must be process ...

Added by blogger3 on Fri, 06 Dec 2019 15:30:17 +0200