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 ;)

risky last
  • 385
  • 4
  • 12

1 Answers1

0

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

demouser123
  • 4,108
  • 9
  • 50
  • 82
  • 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 – risky last Oct 28 '22 at 05:45
  • 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. – demouser123 Oct 28 '22 at 08:32