Dan*_*zak 3 javascript webdriver node.js
如何在webdriverjs中执行自定义javascript代码(https://code.google.com/p/selenium/wiki/WebDriverJs)我发现了执行方法,但它的目的完全不同.
干得好:
var yourClientJSFunction = function (param1, param2) {
// the JS code you want to run in the browser
}
driver.executeAsyncScript(yourClientJSFunction, param1, param2).then(function (res) {
// deal with the response
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3207 次 |
| 最近记录: |