2

i am trying to run the chrome beta version with selenium Web-driver. When i run the test case i got the following error on console see image please:

click here to see exception

I have added following lines in the node config file:

    {
"capabilities": [

    {
        "platform": "WINDOWS",
        "browserName": "chrome",
        "webdriver.chrome.driver":"drive:\selenium\chromedriver.exe",
        "chromeOptions": "drive:\Program Files (x86)\Google\Chrome Beta\Application\chrome.exe",

    }

]  

I am using following setup:

Selenium=2.53
chrome Web-driver= 80_0_3987_16
Google chrome= 80.0.3987.66 (Official Build) beta (64-bit)

we have Hub and Node setup and automated test suit executed from GO cicd Server. any help would be appreciated, thanks

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Asad
  • 49
  • 1
  • 3
  • 9

2 Answers2

1

To run either of the browser variant among:

  • Chrome Canary
  • Chrome from Dev Channel
  • Raw build of Chromium for Windows x64

You need to to download the latest Chromium binary from either of the official repositories:

and you can use the following solution:

  • Code Block:

    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.chrome.ChromeDriver;
    import org.openqa.selenium.chrome.ChromeOptions;
    
    public class A_Chrome_Canary {
    
        public static void main(String[] args) {
    
            System.setProperty("webdriver.chrome.driver", "C:\\Utility\\BrowserDrivers\\chromedriver.exe");
            ChromeOptions opt = new ChromeOptions();
            opt.setBinary("C:\\Users\\AtechM_03\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe");
            WebDriver driver = new ChromeDriver(opt);
            driver.get("https://www.google.com/");
            System.out.println(driver.getTitle());
        }
    }
    
  • Console Output:

    Google
    
  • Browser Snapshot:

Chrome_Canary

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • thanks for the answer @DabanjanB. actually i am trying to run google chrome beta version not canary. it would be really help if you guide me on how setup google chrome beta. – Asad Jan 26 '20 at 15:58
  • i access above official repositories links and i have already download and installed beta chrome. – Asad Jan 26 '20 at 16:01
  • @Asad I think initiating canary and canary will involve the same steps. – undetected Selenium Jan 26 '20 at 16:01
0

This worked for me

chrome_options.binary_location = "C:/Program Files/Google/Chrome Beta/Application/chrome.exe"