开发者

Selenium IDE - plugin to find alternate ID selectors?

I'm using extjs, so of开发者_Go百科ten I need the parent's ID, or the parent's parent's ID for a selector. Is there any plugin which lets me traverse up a DOM element looking for different IDs, or a plugin which can filter out certain ID patterns? (such as ext-gen\d+).


You can use Firebug and Firepath plugin for Firefox to find the IDs


There is possibility to use XPath - it can search even element which contains something. See one of examples here: http://zvon.org/xxl/XPathTutorial/Output/example6.html

I believe you can set the IDE to search by XPath and not only by ID


There is no solution. Use CSS selectors manually and make sure you're running on >FF3.x


Xpath is unique identification of the element. Xpath works better with FF,Safari and Chrome. But it breaks in IE sometime, so in that case you can use Css selectors.You can use Firebug. Over Firebug you need to install firepath. You dont have to consider the DOM before using XPATH generated by firepath. It is very useful if you are having the elements that have dynamic IDs. Both Firebug and firepath are the mozilla addons. First install Firebug then firepath.

In the Selenium IDE when you are recording something. There is drop-down menu in Target in that select XPath:Position. It will work for dynamic element and does not change.

Cheers, Amit Shakya

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜