Environment: Python 2 7.10， selenium3.141.0， pytest4.6.6， pytest-html1.22.0， Windows-7-6.1.7601-SP1
Secondary encapsulation of selenium makes it more convenient to write Case.Adopt PO design idea, one page per page Py, in which the elements and operation methods are defined; In TestCase, directly call the operation method ...
Added by f1nutter on Tue, 11 Jan 2022 14:13:34 +0200
1, Creation of Django project
1. Project creation and operation
Install Django module Open pycharm and install the Django module in the Terminal interactive interface Note: different versions may be slightly different in the use of the framework. Select the version as needed.
pip install django==2.0
Import the module in the python co ...
Added by blufish on Tue, 11 Jan 2022 10:38:40 +0200
Life is short, learn Python!Python is a great language. It is one of the fastest growing programming languages in the world. Again and again, it has proven its usefulness in developer positions and cross industry data science positions. The entire ecosystem of Python and its libraries makes it a suitable choice for users around the world (begin ...
Added by stickman373 on Tue, 11 Jan 2022 09:33:14 +0200
There is a requirement in the project that a base class has a comparison method and a Copy method. In some places, these two methods need to be called frequently. For all subclasses, you need to override these two methods and maintain some member variables within the class. For example, there is a variable M_ Imyval, this needs to be maintaine ...
Added by narimanam on Tue, 11 Jan 2022 06:09:44 +0200
Creation and use of python virtual environment
As a newcomer, I never thought about Python virtual environment management. I thought that all the libraries I want to use are installed together. How good it is to use direct import. However, later, I learned more and more. I not only shed tears of regret, but this time, I caught all the ...
Added by matrixd on Tue, 11 Jan 2022 03:59:09 +0200
Some advanced features of Python
1. When writing a list generator, put the element x **2 to be generated in front, followed by a for loop, which is a general usage.
>>> b = [x**2 for x in range(0,11)]
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
2. List generation can also output ...
Added by alvinshaffer on Tue, 11 Jan 2022 01:57:21 +0200
python everything is an object
All but a few statements in python are objects! Create a class, which is called a class object. It also occupies memory space and has its value.
print(type(Student)) #<class 'type'>
print(Student) #<class 'main_.student'>
Composition of ...
Python Basics - day 6
Slicing operations for lists
Indexing and slicing Positive index: 0 ~ N-1 / negative index: - N ~ -1
nums = [1, 2, 3, 4, 5, 6]
print(nums[2:]) # Gets the elements after index 2, including the elements with index 2
print(nums[::]) # Get all elements
print(nums[::-1]) # Invert all elements
Added by only one on Mon, 10 Jan 2022 23:38:21 +0200
Do you have 10000 friends who see the problem ❓ Do you want to ask what the hell Ancol PCA is. I don't know normal, because I made the word 2333333 Why it's called this name: as we all know, the English of descent is Ancestry, and the English of location is location. These two words take the first three letters, loc and then reverse ...
User model class
1. Django default user authentication system (knowledge introduction)
1. Django has its own user authentication system It handles user accounts, groups, permissions, and cookie based user sessions
2. Django certification system location django.contrib.auth contains the core of the authentication framework and the default ...
Added by xfluous on Mon, 10 Jan 2022 21:15:13 +0200