-1

In Selenium Java we are using ACTION class method or SELECT method to select value from drop down.

Is there a similar method in Python?

  • Is it a div that looks like a dropdown, or is it a real <select> tag? and how would you automate this in Java? – Niels van Reijmersdal Oct 28 at 13:20
0

I think this has been already clarified please have a look here:

Selecting combobox option with a div tag using Selenium Python

  • I think that linked answer is confusing, because the question is not about a Select, but about a dropdown that looks like a select. – Niels van Reijmersdal Oct 28 at 13:17
  • Hmm maybe the question is also confusing, as the title talks about a div, but the question about ACTION and SELECTs. – Niels van Reijmersdal Oct 28 at 13:20
  • Sorry Niels, that didn´t understand the question. My first understanding was about dropdown that looks like a select...sorry in this case I cannot help. Cheers.. – Daniel Boehm Oct 29 at 7:39
0

Did you try to read the documetation for the Selenium Python package? See: https://selenium-python.readthedocs.io/navigating.html

Code example from the documentation:

from selenium.webdriver.support.ui import Select
select = Select(driver.find_element_by_name('name'))
select.select_by_index(index)
select.select_by_visible_text("text")
select.select_by_value(value)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.