Answer the question
In order to leave comments, you need to log in
How to find dropdown menu item through Selenium Python?
Good afternoon. There is an element on the site that, when clicked, brings up a menu. Tell me how to find the sixth element of the dropdown menu through Selenium? I also tried using xpath and names and classes, but the maximum that was possible was to press the button to drop the menu. I post a screenshot of the site code tree
and xpath: /html/body/div1/div/div/div/aside/div/div/div/div[2]/div/div/ui-scroll/div/div/div/ul/ li[6]
Answer the question
In order to leave comments, you need to log in
driver.find_elements_by_xpath("//li[@class='item ng-scope selected']")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question