Mac environment, roborframework operation Selenium
1. Installing the Selenium module
sudo pip install-t/usr/local/lib/python2.7/site-packages/selenium--Specify directory Installation
2. Installing the Selenium2library module
sudo pip install-t/usr/local/lib/python2.7/site-packages/robotframework-selenium2library
3. See if the installation was successful
cd/usr/local/lib/python2.7/site-packages/
Selenium module corresponding to: Selenium and Selenium-3.4.1.dist-info
Selenium2library module corresponds to Selenium2library
4. Download the browser driver:
Chromedriver 2.29----Corresponds to the-----chrome version is: v56~v58 (my chrome version is 58)
selenium3.0 above version requires download of Geckodriver driver
6. Load the download drive to the path. Because it is a Mac system, it is copied directly to/usr/local/bin
Cp/users/username/desktop/dev/geckodriver/usr/local/bin (do not operate this step, run the case prompt does not open the browser)
Cp/users/username/desktop/dev/chromdriver2.29/chromedriver/usr/local/bin
Prepare the environment is OK, you can write code ~~~
4. Open ride.py and start editing scripts
1) New suite, import selenium2library
2) New case, edit script:
Open Browser https://www.baidu.com/chrome----Chrome opens Baidu
3) Run
Prepare: Download each chromedriver version http://chromedriver.storage.googleapis.com/index.html
Relationship table: http://blog.csdn.net/huilan_same/article/details/51896672 1,)
Roborframework Operating SELENIUM--MAC Environment