我正在safari 6上运行Selenium测试。使用javascript executor查找视口高度时
public static String scrollHeightCommand = return document.documentElement.clientHeight;
initialHeight = ((Long) (jsx.executeScript(scrollHeightCommand)))
我收到这个例外
org.openqa.selenium.WebDriverException: 'undefined' is not a function (evaluating 'this.each(function(value, index) {
results.push(iterator(value, index));
})') (WARNING: The server did not provide any stacktrace information)
但是,当我在Safari中的控制台上手动运行javscript命令时,它将返回视口的值。任何人都可以在这里指出问题。
Safari中的selenium webdriver扩展存在问题。从2.30升级到2.38的Selenium Webdriver扩展程序运行良好。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句