Firefox path problem
When firefox Firefox browser to complete automated testing, code reported the following error:
Cannot find firefox binary in PATH. mark sure firefox is installed
wrong reason:
firefox installed in other path, the path is not the default installation
Solution:
Specifies the firefox executable path: webdriver.firefox.bin
Code settings:
selenium 3.x Friefox driver problem
When using selenium3.x + firefox Firefox to complete automated testing, code reported the following error:
The path to the driver executable must be set by the webdriver.gecko.driver system properity
wrong reason:
Firefox missing driver package. If selenium version 3.x, you need to use the driver package
Solution:
Firefox project to add driver package, and load drive configuration.
As for the browser version and the version of the driver adapter selenium are described (eg: using selenium 3.5.1 + firefox 56) driving in the change log
Code settings:
selenium and driver version mismatch problems
+ When using selenium2.x version firefox to complete automated testing, code reported the following error:
Unable to connect to host 127.0.0.1 on port 7055 after 45000ms
Error Summary:
firefox browser version and selenium version does not fit.
Solution:
Firefox recommended version downgrade to 47 or less (for example: selenium 2.53.0 + firefox 46)
selenium fox firefox Description
selenium 2.x
selenium in firefox integrated 2.x automatically driven.
So long as selenium version of firefox browser version corresponds to
selenium 3.x
selenium, geckodriver, firefox corresponding version Description:
◆ From the beginning of selenium 3.0.0 requires firefox 48 and above
◆ selenium 3.x java version of jdk 1.8
◆ alternative selenium 3.x use geckodriver as firefox browser driven
Firefox automation tools Links
Changelog
https://raw.githubusercontent.com/SeleniumHQ/selenium/master/java/CHANGELOG
Firefox drive
https://github.com/mozilla/geckodriver/releases/
Firefox versions
http://ftp.mozilla.org/pub/firefox/releases/
Firefox Drive Image
https://npm.taobao.org/mirrors/geckodriver/
IE browser driver problem
When using the IE browser to complete automated testing, code reported the following error:
The path to the driver executable must be set by the webdriver.ie.driver system property
Error Summary:
IE browser driver missing packets
Solution:
IE project added driver package, load drivers and configure.
System.setProperty("webdriver.ie.driver", "src/test/resources/IEDriverServer.exe");
Download http://www.seleniumhq.org/download/
Recommended to download Version: 3.7.0
http://selenium-release.storage.googleapis.com/index.html?path=3.7/
IE version drive can remain the same version of Selenium
http://selenium-release.storage.googleapis.com/index.html
Protected Mode IE browser problem
When using the IE browser to complete automated testing, code reported the following error:
Protected Mode Settings are not the same for all zones
Solution 1:
Browser settings (replace a computer but do not apply) Open IE -> Tools -> Security -> Enable Protected Mode check all
Solution 2:
Setting ignore the browser's Protected Mode
InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS
Code:
IE browser zoom settings
When using the IE browser to complete automated testing, code reported the following error:
Browser zoom level was set to 125%.It should be set to 100%
Error Summary:
Browser zoom level does not lead to the (point toolbar page -> zoom setting)
Solution:
Ignore this setting:
InternetExplorerDriver.IGNORE_ZOOM_SETTING
Code:
IE browser window loss problems
When using the IE browser to complete automated testing, code reported the following error:
unable to find element with id -- kw
Error Summary:
Not because the waiting time is not set, but because of his previous window object has been lost
Solution:
The quickest solution is to directly specify an initialization page
InternetExplorerDriver.INITIAL_BROWSER_URL
Code:
Chrome
chrome browser drive path
When you use Chrome to do the test, reported the following error:
The path to the driver executable must be set by the webdirver.chrome.driver system properity
solution:
Chrome driven system settings file path
chrome browser and chromeDriver match
When using the chrome browser to complete automated testing, chrome browser stops
chromedriver.exe has stopped working
Error Summary:
chrome browser version is too high, although the official website of the information, the 2.33 driver support for Google chrome 60-62.
But 60 simply will not do.
Solution:
Chrome demoted
chromeDriver version with chrome table
chrome browser versions
http://www.chromedownloads.net/chrome64win/
Prohibit Google Chrome update
https://jingyan.baidu.com/article/76a7e409f2137afc3b6e15be.html
ChromeDriver Mirror
http://npm.taobao.org/mirrors/chromedriver
Selenium Mirror
http://npm.taobao.org/mirrors/selenium
JDK version of the problem
When using 3.x of selenium to complete automated testing, code reported the following error:
Exception in thread "main" java.lang.UnsupportedClassVersionError:
Error Summary:
3.x of selenium needs jdk 1.8 and jdk version may be too low
Solution:
Downgrade selenium version, or to improve the jdk version 1.8
Source: https://mp.weixin.qq.com/s/BKcHSuEtfn9zlD9MI8zdkQ