Roborframework Operating SELENIUM--MAC Environment

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.