Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ChromeDriver 76.0.3809.68 is throwing exception with SelectByVisibleText method: Script returns unexpected result

I have updated the selenium chromedriver to 76.0.3809.68 and the existing tests started to fail with new Select(webElement).selectByVisibleText(value) is failing with the following exception

org.openqa.selenium.WebDriverException: unknown error: script returns unexpected result
  (Session info: chrome=76.0.3809.87)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'VARGHESEV10', ip: '10.13.36.28', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144'
Driver info: com.prahs.framework.PRAWebDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 76.0.3809.87, chrome: {chromedriverVersion: 76.0.3809.68 (420c9498db8ce..., userDataDir: C:\Users\swqatest\AppData\L...}, goog:chromeOptions: {debuggerAddress: localhost:15612}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webdriver.remote.sessionid: cfd7ddc498272f40f9b62c43f67...}
Session ID: cfd7ddc498272f40f9b62c43f6742060
*** Element info: {Using=xpath, value=.//option[normalize-space(.) = "Test_Auto_Pv_243399_RAJ"]}


protected void selectOption(String field, WebElement selectElement, String value) {
    log.info(ReportUtils.formatAction("Select ", field, value));
    Select select = new Select(selectElement);
    select.selectByVisibleText(value);
}
like image 474
vini007 Avatar asked Jan 20 '26 18:01

vini007


1 Answers

I had the same issue, but working fine after downgrading Driver version: Chrome is 76 (76.0.3809.100) and Driver is 75 (75.0.3770.140)

like image 189
Katsiaryna Piotukh Avatar answered Jan 23 '26 21:01

Katsiaryna Piotukh