The installation method of third-party libraries frequently used in the Robot Framework, robotframework
Pip upgrade:
Python-m pip install -- upgrade pip
1. Install robotframework-selenium2library, which is equivalent to selenium in python
Cmd> pip install robotframework-selenium2library
Ii. Interface Test request
Cmd> pip install requests (step 2 is supported; otherwise, an error is reported when the RF introduces the RequestsLibrary library)
Cmd> pip install-U robotframework-requests
Iii. About dictionary
Directly load Collections without pip install
4. Install mysql
First install the DatabaseLibrary library, and then install PyMySQL
The DatabaseLibrary library has a special installation, so it is placed in the final record.
This is based on the copy of the content compiled by Qi Tao. The databaselibrary library contains the original and modified versions.
1. Install DatabaseLibrary
1). Original Installation Method
There are two ways to install the original version:
A. pip Installation
Cmd> pip install robotframework-databaselibrary (Note: This version is 0.6)
B. Source Code Installation
Download the 0.7 version on github, decompress it, and install it. I have introduced the installation method before. Go to the decompressed directory (with the setup. py file ),
Enter python setup. py install
2). How to install the modified version
The original package has a small problem: sqlite can only use the database files in the current directory in windows. If the path is specified, the windows path separator \ is used as an escape character in Python,
Then, we added some minor implementation problems and used \ to separate the paths. Therefore, I made some modifications to solve this problem.
Modified github home: https://github.com/qitaos/Robotframework-Database-Library
Modified pypi home: https://pypi.python.org/pypi/robotframework-databaseslibrary
It is very similar to the original version path. I just added s, and the Copyright still belongs to the original author.
There are two ways to install the modified version:
A. pip Installation
Cmd> pip install robotframework-databaseslibrary
B. Source Code Installation
Download the latest version from the github page of the modified version and go to the decompressed directory (with the setup. py file ),
Enter python setup. py install
Note: although the modified version adds s to the pip installation name, the name is DatabaseLibrary when the Test Library is loaded. If you have installed the original version, install the modified version, will be overwritten.
However, it does not affect the coverage. We recommend that you use a modified version.
2. You have installed the DatabaseLibrary library and then installed mysql.
Cmd> pip install PyMySQL
In summary, the optimal command to install mysql using pip is:
Cmd> pip install robotframework-databaseslibrary
Cmd> pip install PyMySQL
If the text is incorrect, I hope you can point it out. Thank you.