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

后端 未结 6 2080
梦毁少年i
梦毁少年i 2021-01-14 09:09

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 failin

相关标签:
6条回答
  • 2021-01-14 09:22

    Not just selectByVisibleText even selectByValue was also throwing the same Exception

    "org.openqa.selenium.WebDriverException: unknown error: script returns unexpected result".

    I faced this issue with chrome v76. I upgraded the chrome version to 77 and tested with ChromeDriver 76 and 77 which works fine now.

    0 讨论(0)
  • 2021-01-14 09:28

    I think the fix for this issue was released in chrome 76.0.3809.126, please check.

    0 讨论(0)
  • 2021-01-14 09:31

    I was getting same issue but working as expected, after updating Chrome to Version 76.0.3809.87 and driver to latest

    0 讨论(0)
  • 2021-01-14 09:32

    I also experienced this issue with ChromeDriver 76.0.3809.68 and Chrome 76.0.3809.100. It works with ChromeDriver 76.0.3809.126 and Chrome 76.0.3809.100.

    0 讨论(0)
  • 2021-01-14 09:43

    Not really a fix but this is due to the fix made for issue 3084: Find Elements not working properly in ChromeDriver 76 when prototype.js 1.6.1 is used [Pri-2], select tags are not working. Just the presence ofprototype.js` is enough this to be failed. You can try the following to recreate

    <html>
        <head>
            <title>test</title>
        </head>
    
        <body>
            <select id="sample">
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
            </select>
    
            <script src="https://ajax.googleapis.com/ajax/libs/prototype/1.6.1/prototype.js" type="text/javascript"></script>
        </body>
    </html>
    

    Error:

    org.openqa.selenium.WebDriverException: unknown error: script returns unexpected result
      (Session info: chrome=77.0.3865.75)
    

    If you have the control of the application you can upgrade the version of prototype.js.

    0 讨论(0)
  • 2021-01-14 09:44

    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)

    0 讨论(0)
提交回复
热议问题