I am trying to automate a test case using java code.I use the selenium server libraries for the same.Now when i reach a certain page i get a drop down box which has a certain number of elements.The drop down box is called 'Genre'. Now what i want to be able to do is to click the drop down box which i want to expand so that at the next step i am able to click on a particular item for eg. Rock/Metal/Pop etc.All the above i am trying to automate but every time i do so i am thrown the same exception :
Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"xpath","selector":"//*[@id='Genre']"}
I have tried the various methods available with By ie By.xpath,By.name,By.id etc but to no avail.I am thus copy pasting information related to the 'Genre' box for your reference.Please guide me on which method to use so that i can successfully achieve the goals i just described.
View selection source when i highlight Genre gives me :
<td id="genre" width="50%">
Genre <br><select name="Genre" id="Genre" class="input_boxbbb" onchange="subgener(this.value)"><option value="0000">All</option><option value="26">AIRTEL JINGLE</option><option value="19">ARTISTS</option><option value="27">BATTERY</option><option value="25">BOLLYWOOD</option><option value="28">