1

I am trying to use the Select function in Selenium for Python 3 to help with navigating through the drop down boxes. However, when I try to import org.openqa.selenium.support.ui.Select I get an error message:

"No module named 'org'"

Would appreciate any help on this. I saw there was a similar question posted a few weeks ago but the link to that question is now broken. Thanks!

kasedith
  • 13
  • 1
  • 3

1 Answers1

4

The path 'org.openqa.selenium.support.ui.Select' is a Java descriptor. In Python, make sure you have the Python Selenium module installed with pip install selenium, and then import it with import selenium.

For the Select function specifically, you can import that with the following

from selenium.webdriver.support.ui import Select

Then you'll be able to use it like this:

select = Select(b.find_element_by_id(....))

Bianchi
  • 138
  • 1
  • 2
  • 7