0

I am trying to use Select in my code to interact with a dropdown, i tried importing Select from "selenium-webdriver" package but it does not work. all the results i get when searching about it lead to python codes importing Select from selenium-webdriver.support.ui package which i'm not able to find in javascript package. Any help in how to import Select class into js code would be very much appriciated ;)

asked Oct 28, 2022 at 5:30

1 Answer 1

1

There is no select class in Selenium JS. Your best bet is to click on the element, and once it is visible, select by clicking on it.

Select from dropdown in selenium-webdriver javascript

answered Oct 28, 2022 at 5:37
Sign up to request clarification or add additional context in comments.

2 Comments

thank you!! i was trying to use click but was unsure if it was the way to go. is selenium python more preferred over js? cause there's very few resources out there on js
There are a lot of other js libraries like nightwatch, webdriverio, protractor (deprecated) which use base selenium architecture. You can use any one of these.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.