How To enable Chrome Extension (DotVPN) using selenium Webdriver

Hi
Iam using sel 3.7.1, and java 9.0.1, and ecllipse as oxygen.
My Scenario is to Enable the chrome extension (DotVPN) using selenium webdriver.
I tried with this code,

WebDriver driver = null;
System.setProperty(“webdriver.chrome.driver”, “E:/Selenium/Chromedriver/chromedriver.exe” );
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addExtensions(new File(“E:/Selenium/DotVPN.crx”));
DesiredCapabilities desiredCapabilities = DesiredCapabilities.chrome();
desiredCapabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);
driver = new ChromeDriver(desiredCapabilities);

With this code iam able to get the extension along with the browser open, but unable to click on extension to provide login details to enable.
Can any one suggest please.
Thanks in advance.

Default Asked on November 20, 2017 in Selenium WebDriver.
Add Comment
  • 1 Answer(s)

    My Scenario is to Enable the chrome extension (DotVPN) using selenium webdriver.
    I tried with this code,

    WebDriver driver = null;
    System.setProperty(“webdriver.chrome.driver”, “E:/Selenium/Chromedriver/chromedriver.exe” );
    ChromeOptions chromeOptions = new ChromeOptions();
    chromeOptions.addExtensions(new File(“E:/Selenium/DotVPN.crx”));
    DesiredCapabilities desiredCapabilities = DesiredCapabilities.chrome();
    desiredCapabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);
    driver = new ChromeDriver(desiredCapabilities);

    With this code iam able to get the extension along with the browser open, but unable to click on extension to provide login details to enable.
    Can any one suggest please.
    Thanks in advance.

     

    For More Details: https://www.janbasktraining.com/selenium-testing-course/

    Train Answered on November 30, 2017.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.