I'm relatively new to Webdriver, and I am wondering if it is possible to select items on a dropdown that use a guid.
Normally, I would use
new Select (driver.findElement(By.id("location"))).selectByVisibleText("value");
However, as the page is using a random identifier for each of the dropdowns which change with each load of the page it is making it extremely difficult to automate!
When the DOB as a whole has been completed, it's ID is 'DateOFBirth'
If I could get some help with this, it would be greatly appreciated,
This the element for the "Date" dropdown
<select class="valid" aria-invalid="false"id="a9fbd53c8d354e4b8a5d74c5ad1499d5" name="DateOfBirth.a9fbd53c8d354e4b8a5d74c5ad1499d5" onchange="OnChangeDateOfBirth('a9fbd53c8d354e4b8a5d74c5ad1499d5', '190a3115711d4415aeaf6bf7fc658e2b', '3dbf7448224e4042ac1e477abc345981', 'DateOfBirth');">
It doesn't seem that there are any singulairties at all when the page is refreshed. is there any way I could start it using the default value? which is "Date:"
Update
- I managed to resolve this using xpathsnew Select(driver.findElement(By.xpath("//div[@id='content-holder']/ul/li[3]/ul/li[5]/fieldset/select"))).selectByVisibleText("14");