Selenium Learning Notes---novice learning record (2) Summary of the problem

Source: Internet
Author: User

Today, we studied the next IE, Chrome, firefox browser execution script

1. First Firefox execution, I was installed on the D drive, so to change the path

If Firefox is not installed by default on the C drive, you need to set its path
System.setproperty ("Webdriver.firefox.bin", "D:/softwareinstallation/huohu/firefox.exe");
Webdriver Driver = new Firefoxdriver ();

2. When executing under Chrome, the following issues are encountered

Exception in thread ' main ' java.lang.IllegalStateException:The path to the driver executable must is set by the Webdriver . Chrome.driver system property; For more information, see Http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can downloaded from http://code.google.com/p/chromedriver/downloads/list

Workaround:

Download the chrome driver plug-in, (including IE driver plugin), the code is as follows, and if you have a question, add the path to the PATH variable

HTTP://YUNPAN.CN/C3KPMJTZDDLYV Access Password 4dd5

1 // Google Chrome 2 system.setproperty ("Webdriver.chrome.driver", "c:\\users\\administrator\\desktop\\testzidong\\ Selenium\\anzhuangbao\\chromedriver_win32\\chromedriver.exe ");        3 webdriver driver=new  chromedriver (); 4         

3. The above type issue occurs when running under IE. The solution is ibid.

The code is as follows:

1 system.setproperty ("Webdriver.ie.driver", "c:\\users\\administrator\\desktop\\testzidong\\selenium\\ Anzhuangbao\\iedriverserver_x64_2.48.0\\iedriverserver.exe "2  new Internetexplorerdriver ();

But there are other errors in the run-time package.

Here's how to do this: get all the safe areas of IE options on the hook

Selenium Learning Notes---novice learning record (2) Summary of the problem

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.