I have a select box which has 3 values in the drop-down. When I click on the select box and then further use click()
on the value item , it works fine. but when I use Keys.ARROW_DOWN
its displays the select values but does not click/select the item in drop down. Also I don't want to use 'Select' class for it.
driver.findElement(By.xpath(".//*[@id='ctl04_Pane2_AttributeDefinitionCategoryTest']/td[2]//td[2]")).click();
Thread.sleep(2000);
driver.findElement(By.xpath(".//*[@id='ctl04_Pane2_AttributeDefinitionCategoryTest']/td[2]/div/select")).sendKeys(Keys.ARROW_DOWN);
Also if the 'Id' of the select box changes dynamically, then should we use the webdriver 'Select' class for it?