我在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命令时,它会返回视口的值。任何人都可以在这里指出这个问题。
答案 0 :(得分:0)
这是safari中selenium webdriver扩展的一个问题。从2.30升级到2.38时,selenium webdriver扩展工作正常。