开发者

Ext JS/GWT Combobox

So I have a somewhat strange problem. I'm testing a GWT combobox with selenium and I'm having trouble executing the click command on a specific combo list value. This is the code I am using:

selenium.click("//div[@id='My Id']/img");
selenium.waitForCondition("var value = selenium.isElementPresent('//div[contains(@class, \\'x-combo-list\\') and contains(@style, \\'visibility: visible\\')]'); value == true", "6000");
selenium.click("//div[contains(@class = 'x-combo-list')]/descendant::div[contains(@class = 'x-combo-list-item')][text()='cache']");
selen开发者_JAVA技巧ium.waitForCondition("var value = selenium.isElementPresent('//div[contains(@class, \\'x-combo-list\\') and contains(@style, \\'visibility: visible\\')]'); value == false", "7000");

This code clicks on the combo-box arrow, but it doesn't seem to click any value from the drop down list. Any ideas?


I've got the same issue using Selenium and also using Tellurium.

Finally, I created a jQuery statement that does the trick:

$('div.x-combo-list-item').filter(function(){return this.innerHTML.match('TestItem')}).trigger('mousedown');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜