Forum Discussion

Raghukatta's avatar
Raghukatta
Contributor
7 years ago

select a value from drop down list

Hi ,

 

I am trying to click on a value from drop down list.I am using below code.

 StatusList=DealerPage.EvaluateXPath(".//*[@id='DealerListForm']/div[1]/span[2]/select")

 StatusList(0) is the object if I check in watch there are WItem values for this object.Item values are --Any Status--,Supported,Unsupported

I used below functions but I am not able to select a value from the drop down.

StatusList(0).SelectedIndex=0--not working

StatusList(0).ClickItem(0) --not working

StatusList(0).ClickItem("Unsupported")-- not working

StatusList(0).keys("[Down]"--this is working

Please let me know if there is any other way I can select a value in the drop down.

Thanks all in advance for the replies.

 

 

 

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    You've listed all the standard ways of doing so...  

     

    You mention that certain of these options are "not working".  What exactly is happening?  Are you getting an error message? Is the wrong item being selected? Are there warnings or errors in your log file?