Error org.openqa.selenium.WebDriverException:disconnected:unable to connect to renderer solution

Source: Internet
Author: User

Do automation often encounter incompatible problems, such as the following simple script, mainly open the browser, and then maximize the window, open Baidu, input content search, the code is as follows:

 PackageCom.gs.selenium;Importorg.openqa.selenium.By;ImportOrg.openqa.selenium.WebDriver;ImportOrg.openqa.selenium.chrome.ChromeDriver;Importorg.openqa.selenium.chrome.ChromeOptions; Public classDemo1 { Public Static voidMain (string[] args) {System.setproperty ("Webdriver.chrome.driver", "E:\\ware\\selenium\\chromedriver_win32\\chromedriver.exe"); Chromeoptions Options=Newchromeoptions (); Options.addarguments ("Disable-infobars");//set the Chrome browser's parameters so that it doesn't pop-up (Chrome is under the control of the automated test software)Webdriver Dr=Newchromedriver (options); Dr.manage (). window (). Maximize ();//Maximize Your browserDr.get ("https://www.baidu.com");//Open the URL you want to test, such as Baidudr.findelement (By.id ("KW")). SendKeys ("Hello");//Enter search keywordsSystem.out.print ("open page"); Try{Thread.Sleep (6000); } Catch(interruptedexception e) {//TODO Auto-generated catch blockE.printstacktrace (); } dr.close ();//Close Browser}

Selenium 3.7 version enlarged browser window error is as follows

Error: Exception in thread ' main ' org.openqa.selenium.WebDriverException:disconnected:unable to connect to renderer

To view the error, the script runs to the window to maximize the errors, after careful analysis, found that the Chrom version is 62, incompatible with the chromedriver caused by the problem.

Workaround:

Go to the following URL to download the Chromedriver:

https://npm.taobao.org/mirrors/chromedriver/

After the download, run the above script, the problem is resolved successfully.

Finally, attach the Java Project jar package diagram:

Error org.openqa.selenium.WebDriverException:disconnected:unable to connect to renderer solution

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.