我阅读了有关用户扩展和扩展selenium但我想知道如何从我正在创建的自定义命令中调用命令.
我在Selenium IDE Options中向Selenium核心扩展(user-extensions.js)添加了类似于以下的文件.
// selenium-action-example.js
Selenium.prototype.doExample = function() {
this.doOpen("/"); // doesn't waitForPageToLoad like the command does
// These two commands are equivalent to the clickAndWait command. NOT!
// For proof, see the filterForRemoteControl function:
// http://code.google.com/p/selenium/source/browse/trunk/ide/src/extension/content/formats/formatCommandOnlyAdapter.js?r=8284#68
this.doClick("css=a#example");
this.doWaitForPageToLoad(); // doesn't wait at all
this.doClick("link=Example");
this.doWaitForElementPresent("example"); // error! undefined function
this.doClick("example");
};
Run Code Online (Sandbox Code Playgroud)
换句话说,我如何在自定义操作中的点击之间等待?