Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: Selenium WebDriver v4 Ruby select_by(:index) for a dropdown fails, which was fine in v3.142.7 #9945

Closed
courtneyzhan opened this issue Oct 18, 2021 · 2 comments

Comments

@courtneyzhan
Copy link

What happened?

Select dropdown by index no longer works in Selenium WebDriver 4.0.0 Ruby (in 4.0.0beta and 4.0.0.rc as well).
The same test script has always worked fine in v3.

Select by text or value is fine.

How can we reproduce the issue?

driver.get "https://crossbrowsertesting.github.io/selenium_example_page.html"
 elem = Selenium::WebDriver::Support::Select.new(driver.find_element(:id, "dropdown"))
 elem.select_by(:index, 2)

Relevant log output

Failure/Error: elem.select_by(:index, 2)
 Selenium::WebDriver::Error::NoSuchElementError:
       cannot locate element with index: 2

Operating System

macOS Big Sur, Windows 10

Selenium version

4.0.0

What are the browser(s) and version(s) where you see this issue?

Chrome v94 (and v94)

What are the browser driver(s) and version(s) where you see this issue?

ChromeDriver 94.0.4606.61 (and v93)

Are you using Selenium Grid?

No

@titusfortner
Copy link
Member

Yup, this was trying to get index using #dom_attribute instead of #property, which was wrong. Fix is in master, look for 4.0.3 to be released soon.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants