Before posting, I researched across stackoverflow to solve this issue but could not find solution as most of them provide solution related to Select class. Some of the links that I did come across and did not solve my issue are below,
- How to select a dropdown value in Selenium WebDriver using Java
- How to select dropdown value in selenium webdriver using Testng?
- How to select dropdown option from span in selenium webdriver
- Selenium WebDriver: Handling DropDowns
- Select dropdown in selenium webdriver
I have 6 dropdown menus which has same dropdown list and same HTML tags.I am unable to select value from each dropdown menu. One of the dropdown menu looks like below,
I have HTML with dynamic div ids,
My xpath to select one of the options is as -> //li[text()='No Problems']. Below method does click on Dropdown menu but fails to click on No Problems. I could not use Select class as DOM does not have select tag.
Below are the 2 different methods that I tried to select dropdown option,
Please help how to overcome this scenario and select dropdown list option.