chrome web driver code example

Example 1: selenium set chrome executable path

chromedriver = "/path/to/chromedriver"
options = Options()
options.binary_location = '/path/to/chrome'
driver = webdriver.Chrome(chromedriver, chrome_options=options)

Example 2: selenium set chrome executable path

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

ChromeDriver driver = new ChromeDriver(options);

Example 3: chrome web driver

/**
 * Create the RemoteWebDriver instance.
 *
 * @return \Facebook\WebDriver\Remote\RemoteWebDriver
 */
protected function driver()
{
    return RemoteWebDriver::create(
        'http://localhost:9515', DesiredCapabilities::chrome()
    );
}

Example 4: chrome webdriver download

Supports Chrome version 88
Resolved issue 3611: getText() output in protractor different from <element>.innerTextResolved issue 3625: Improve element screenshot compatibilityResolved issue 3628: Stale Element Reference and wrong URL reported back with URL having another URL as part of its pathResolved issue 3631: Add support for the `webauthn:extension:largeBlob` capabilityResolved issue 3635: Chromedriver 86 - chromedriver .quit() doesn't seem to pass unload event properlyResolved issue 3649: Copying selected text to clipboard does not work on Windows 10 when using headless modeFor more details, please see the release notes.