Robot Framework + Selenium Library + iedriver Environment building
2015-11-26
Directory:
1 Installation File Preparation
2 Robot frame structure
3 Environment Construction
3.1 Installing Python
3.2 Installing the robot Framework
3.3 Installing Wxpython
3.4 Installing Ride
3.5 Installing Selenium2library
3.6 Installing Iedriverserver
1 Installation File Preparation
Return
Table 1 installation file preparation
Classification |
Name |
Download file |
|
Details |
Robot |
Python |
|
https://www.python.org/ |
Install Python |
Robot Framework |
|
https://pypi.python.org/pypi/robotframework/2.8.7 |
Installing the Robot Framework |
WxPython |
|
http://www.wxpython.org/download.php |
Installing Wxpython |
RIDE |
|
Https://pypi.python.org/pypi/robotframework-ride |
Installing Ride |
Selenium for IE |
Selenium2library |
|
https://pypi.python.org/pypi/robotframework-selenium2library/1.5.0 |
Installing Selenium2library |
Iedriverserver |
|
Http://selenium-release.storage.googleapis.com/index.html |
Installing Iedriverserver |
2 Robot frame structure
Return
In order to better understand the installation of the environment, we first look at the framework structure:
Figure 1 Robot Framework Architecture
Robot Framework by importing different libraries, you can use the keywords provided in the library to test the relevant tests. There are several standard libraries bundled with the robot framework, and in addition to the robot framework there are a number of external libraries that have been developed separately, which you can install as needed. You can also create your own test library to install.
In table 1 above, selenium2library is an external library, selenium2library is primarily for automated testing of Web applications, browser Firefox is supported by default, and additional iedriverserver are installed when testing browser ie.
3 Environment Construction
Return
3.1 Installing Python
The Robot framework requires a Python or jython environment, depending on which environment you use to test libraries or test tools.
(Visit the Official Python website): https://www.python.org/
Download file: Python-2.7.10.amd64.msi (here, install to directory:D:\Python27 . All files installed below are related to this directory)
Description: Python is divided into two versions of Python2 and Python3. Here, considering that the robot framework framework is based on Python2 development, select Install Python2.
Note: Place python's installation path and script path (for example, d:\python27;d:\python27\scripts) into the environment variable path.
3.2 Installing the robot Framework
: https://pypi.python.org/pypi/robotframework/2.8.7
Download files: Robotframework-2.8.7.win-amd64.exe and robotframework-2.8.7.tar.gz
Installation method: Robotframework-2.8.7.tar.gz installation: After decompression, execute cmd command under decompression path: Python setup.py install
3.3 Installing Wxpython
: http://www.wxpython.org/download.php
Download file: Wxpython3.0-win64-3.0.2.0-py27.exe
Description: WxPython is a well-known GUI library for Python because ride was developed based on this library, so this must be installed.
3.4 Installing Ride
: Https://pypi.python.org/pypi/robotframework-ride
Download files: Robotframework-ride-1.5.win-amd64.exe and robotframework-ride-1.5.tar.gz
Installation method: Robotframework-ride-1.5.tar.gz installation: After decompression, execute cmd command under decompression path: Python setup.py install
Description: RIDE is an editor for the robot Framework test data. It enables the organization of test case creation, run, and test projects to be done under the graphical interface.
After you install the ride, the desktop generates a ride icon. Double-click Start, the interface is as follows:
Figure 2 Ride interface
Note : We often encounter, after the installation completes ride, double-click the desktop ride cannot start the situation, may have two kinds of causes:
reason one : Ride shortcut target setting is not causing
We can right-click on the Desktop Ride icon and right-click Properties: Switch to shortcut mode. Set the target (T) to the actual path D:\Python27\pythonw.exe-c "from robotide import main; Main () "
cause two : due to inconsistencies in the Wxpython version that ride relies on.
Enter this line of code ' from robotide import main ' by opening the Python Shell with the following result:
From robotide Import mainWxPython not found. You need to install WxPython 2.8 Toolkit with Unicode support to run Ride.wxpython 2.8.12.1 can be downloaded fromhttp://s Ourceforge.net/projects/wxpython/files/wxpython/2.8.12.1/
From telling you wxpython 2.8. Version 12.1 can be downloaded and installed in the address below.
3.5 Installing Selenium2library
: https://pypi.python.org/pypi/robotframework-selenium2library/1.5.0
Download files: Robotframework-selenium2library-1.5.0.win-amd64.exe and robotframework-selenium2library-1.5.0.tar.gz
Installation method: Robotframework-selenium2library-1.5.0.win-amd64.exe installation: After decompression, execute cmd command under decompression path: Python setup.py install
3.6 Installing Iedriverserver
: http://selenium-release.storage.googleapis.com/index.html
Download file: IEDriverServer.exe
Installation method: Download the IEDriverServer.exe and put it in the installation directory: D:\Python27
Note: If you do not install iedriverserver, test ie, ride will receive the following error:,
WebDriverException:Message:IEDriver executable needs to being available in the path. Download from http://selenium-release.storage.googleapis.com/index.html and read up at https://github.com/ Seleniumhq/selenium/wiki/internetexplorerdriver
Note : When you test IE, the following error may pop up:
WebDriverException:Message:Unexpected Error Launching Internet Explorer. Protected Mode settings is not the same for all zones. Enable Protected Mode must is set to the same value (enabled or disabled) for all zones.
Solution: Set the protection mode for all areas of IE to disable
Robot Framework + Selenium Library + iedriver Environment building