I have an application which uses Dijit Combobox. What happens is, I click on the cell. It opens up开发者_运维知识库 a dropdown. This is getting properly recorded in the IDE. But, when I choose a value from the drop down, IDE is not recording that part.
Here is the firebug screenshot of the combo box that appears on clicking on the cell. As you can see it has two values cm2 and mat1. I need the IDE code to choose either of these values.
I tried something like
click - //div[@id='csi_table_Widget_5']/div[2]/table/tbody/tr/td[11]
This works fine for opening the drop down.
click - //div[@id='widget_csi_widget_FilteringSelect_10_dropdown']/ul/li[4]
This does not work for choosing a value from the drop down.
Any help, please?
If you absolutely have to click the value, then I think you need to check the ID you are using. Based on the DOM you should be using //div[@id='csi_widget_FilteringSelect_10_dropdown']... instead of widget_csi_... I'm not sure a selector on widgetid would work in selenium.
Alternatively, if you know what value you will be entering into the combo, you could use selenium.type for all but the last character you need to enter, and then selenium.keyPress for the last one. This will fire dojo's change method and select the value in question, unless there is more than one matching the string provided.
精彩评论