17 study notes Python installation robot Framework

 

 

Because the project team to do automated testing, in fact, I hope we can use MStest + unit + C # to achieve.

After all, the product is based on the .net environment, and use C # development environment, fit better, some developers can reuse the code.

But the leadership of the group based on the level of development of personnel, it is recommended to use python + robotframework way, more convenient maintenance and development of the code later.

Thus, the search for how to install the robot framework framework in python environment. Now back online many of which are based on the old version 2.7, or more complicated steps.

Research down, in fact, it is not so complicated:

First my environment is python3.7, IDE is pycharm Community Edition has been installed the PIP.

In fact, we simply open the cmd window or IDE, installed directly robot-ride on it, and its associated dependent components will be automatically installed:

Open a CMD window type: 

pip install robot-framework-ride

 

Because I did not use pycharm environment, the installation process gives some environment variables wrong message can simply be ignored.

We go directly to the address given, can be run directly ride.py:

Run the command: python ride.py

ride on the open interface:

The latest version is 1.7.3.1 version of the current ride.

The catalog of our tools, you can find a way to create a desktop shortcut, you can directly select:

We can see that there is a shortcut on the desktop the way:

 

After the ride is installed, we may need some third-party libraries to support our case design.

We can first take up the browser's official website robotframework which has developed a good understanding of third-party libraries and include:

https://robotframework.org/ 

Then we can directly use PIP installed as needed, for example, we installed a seleniun2Library:

input the command: 

pip install --upgrade robotframework-selenium2library

 

The system will automatically start the installation.

安装完毕后,我们重新打开ride,然后新建一个project,再增加一个test suite或者testcase。

点击新建的project, 点击右侧的‘library’, 在弹出界面中输入 Selenium2Library,并确认。

如果新加入的library的字体是黑色的而不是红色的,就表示rid找到了这个库,可以正常使用了。

按F5或者右键选择project,选择search keywords, 在弹出的界面中,选择selenium2library,就可以看到所有selenium库中的关键字了。

到这里,robot的安装和库的导入我们就介绍完了,后续的内容会接续介绍有关python和robot的使用情况。

 

Guess you like

Origin www.cnblogs.com/wanghao4023030/p/11366649.html