相关疑难解决方法(0)

Selenium的解决方法是不使用InternetExplorerDriver单击按钮

我在网页上有一个按钮,当我通过IE运行时,Webdriver不会点击 - 我尝试过以下的解决方法,但没有运气 -

点击通过Javascript:

((JavascriptExecutor) driver).executeScript("$(arguments[0]).click()", webElement)
Run Code Online (Sandbox Code Playgroud)

使用SendKeys:

webElement.SendKeys(keys.Enter)
Run Code Online (Sandbox Code Playgroud)

使用Action Builder

Actions test = new Actions(driver);
        test.moveToElement(webElement);
        test.clickAndHold();
        test.release();
        test.build();
        test.perform();
Run Code Online (Sandbox Code Playgroud)

确保窗口是活动窗口,然后单击父对象,然后单击对象本身

问题是,它们都不起作用.我已经检查过Firefox和Chrome,脚本运行正常.我已经确认在使用IE时会找到该元素.我还可以尝试其他解决方法吗?

java selenium webdriver

8
推荐指数
1
解决办法
4563
查看次数

标签 统计

java ×1

selenium ×1

webdriver ×1