1

As you can find at cannot stop Chrome from updating from 43 to 44 I am having problem with chrome 44, as RobW suggested (in comments) i got a stand alone chrome.exe which has the version that I need, but now I do not know how to connect it to my test application which is written by Selenium & JAVA.

Community
  • 1
  • 1

1 Answers1

1

You need to point the "binary" to your standalone Chrome using ChromeOptions:

ChromeOptions options = new ChromeOptions()
options.setBinary(new File("/path/to/chrome"));

DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);

ChromeDriver driver = new ChromeDriver(capabilities);
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195
  • His problem is the new version of Chrome came out before the webdriver for it was updated. – TheSmartWon Jul 29 '15 at 21:24
  • @ZackAllen nope, the OP downloaded a custom chrome executable and wants to automate it through selenium. I've paid attention to the previous questions Sina asked. Thanks. – alecxe Jul 29 '15 at 21:24
  • @alecxe Thanks for your help, I allready have "driverChrome = new ChromeDriver(capabilities);" how can I add this option to it too? –  Jul 29 '15 at 21:29
  • @SinaGolestanirad thanks, please try with the updated answer. – alecxe Jul 29 '15 at 21:33
  • @alecxe now it is throwing this error : INFO: Command failed to close cleanly. Destroying forcefully (v2). org.openqa.selenium.os.UnixProcess$SeleniumWatchDog@55040f2f Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: chrome failed to start .... –  Jul 29 '15 at 21:57
  • @SinaGolestanirad okay, can you launch the binary manually, does it work? – alecxe Jul 29 '15 at 22:00
  • @alecxe if by "launch the binary manually" you mean that chrome pens if I double click on chrome shortcut on desctop ,then yes, but even when I uninstall it and install chrome 44 it still gives the same error –  Jul 29 '15 at 22:20