How to select an option of a javascript dropdown which is having no element for its options …

I am able to click on dropdown but is unable to select any option of that dropdown as there is no element for those elements . What i should do ??

Train Asked on August 22, 2014 in Selenium WebDriver.
Add Comment
  • 4 Answer(s)

    hi sajal

    Select oSelection=newSelect(driver.findElement(By.id(id)));

    oSelection.selectByIndex(index);just count the index of elemnt you wanted to click
    i hope it will work
    if it wont you can share screent shot of those html element

    2nd::  you can try using xpath of the dropdown values as you mentioned it is in form of td

    thanks

    Vice Professor Answered on August 22, 2014.
    Add Comment

    Hi sajal,

    Visit http://www.toolsqa.com/selenium-webdriver/dropdown-multiple-select-operations/ site. You can get clear understanding about the problem you are facing.

    Regards,
    Vaidy

    Doctor Answered on August 22, 2014.
    Add Comment

    Can you show us the site or can paste the complete html of the drop down menu or may be the JavaScript code. If its a javascript.

    Thanks
    Virender

    Professor Answered on August 22, 2014.
    Add Comment

    Default Answered on December 1, 2014.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.