Saturday, 2 January 2016

Selenium Chrome Browser Automation issue solution




Reciving Error Message like "you are using an unsupported command line flag: ignore certificate errors stability and security will suffer" while automte the chrome browser using selenium


Solution


use below lines of code to solve this issue



System.setProperty("webdriver.chrome.driver","<<your chrome path>>");
    // To remove message "You are using an unsupported command-line flag: --ignore-certificate-errors.
    // Stability and security will suffer."
    // Add an argument 'test-type'
    DesiredCapabilities capabilities = DesiredCapabilities.chrome();
    ChromeOptions options = new ChromeOptions();
    options.addArguments("test-type");
    capabilities.setCapability("chrome.binary","<<your chrome path>>");
    capabilities.setCapability(ChromeOptions.CAPABILITY, options);

    driver = new ChromeDriver(capabilities);


link -> http://stackoverflow.com/questions/23771922/protractor-error-message-unsupported-command-line-flag-in-chrome/23816922#23816922


********************************************************************************

Time out Exception receiving message from the renderer or chrome is not working properly
------------------------------------------------------------------------------------

Solution

Please comment below lines of code to resolve this issue

//driver.manage().timeouts().implicitlyWait(2000, TimeUnit.MILLISECONDS);
//driver.manage().timeouts().pageLoadTimeout(40, TimeUnit.SECONDS);
//driver.manage().timeouts().setScriptTimeout(60, TimeUnit.SECONDS);

No comments:

Post a Comment