Selenium WebDriver IE11:JavaScript错误

Selenium WebDriver IE11:JavaScript错误,java,internet-explorer,selenium,selenium-webdriver,webdriver,Java,Internet Explorer,Selenium,Selenium Webdriver,Webdriver,我正在使用WebDriver帮助进行Oracle Portal webapp的回归测试,我曾尝试让我的测试脚本与IE11一起运行,但没有任何成功 我知道IEDriverServer.exe目前不支持WebDriver,并且该问题需要Microsoft的合作,我已经尝试了在对Selenium问题的回应中概述的步骤 所有区域的保护模式设置相同 已禁用增强保护模式 这是我试图执行的代码: @Test public void Ts_Advertisement_disti() throws Excepti

我正在使用WebDriver帮助进行Oracle Portal webapp的回归测试,我曾尝试让我的测试脚本与IE11一起运行,但没有任何成功

我知道IEDriverServer.exe目前不支持WebDriver,并且该问题需要Microsoft的合作,我已经尝试了在对Selenium问题的回应中概述的步骤

  • 所有区域的保护模式设置相同
  • 已禁用增强保护模式 这是我试图执行的代码:

    @Test
    public void Ts_Advertisement_disti() throws Exception {
        launchURL(url);
        LoginCheck("ts_Advertisement_disti");
        // Check the Continue and Accept button for user
        checkContinueAndAcceptButton();
        // write out the title of the page in console
        System.out.println(driver.getTitle());
        assertEquals("Home", driver.getTitle());
        assertTrue(isElementPresent(By.xpath("//div[contains(@class,'advertisement-holder')]")));
        System.out.println("Element is present");
        assertTrue(isElementPresent(By.xpath("//img[contains(@id,'ad_image')]")));
        System.out.println("Element is present");
        // Verify img <a> navigates to location
        String follow_url = driver.findElement(By.xpath("//div[contains(@class,'advertisement-holder')]/a")).getAttribute("href");
        System.out.println(follow_url);
        Thread.sleep(5000);
        // Follow advertisement and verify not on landing page
        driver.get(follow_url);
        assertNotEquals("Home", driver.getTitle());
        driver.navigate().back();
    
    @测试
    public void Ts_advision_disti()引发异常{
    启动url(url);
    登录检查(“ts_广告区”);
    //选中用户的“继续并接受”按钮
    选中ContinueAndAcceptButton();
    //在控制台中写出页面的标题
    System.out.println(driver.getTitle());
    assertEquals(“Home”,driver.getTitle());
    assertTrue(isElementPresent(By.xpath(//div[contains(@class,'advision-holder')]));
    System.out.println(“元素存在”);
    assertTrue(isElementPresent(By.xpath(//img[contains(@id,'ad_image')]))));
    System.out.println(“元素存在”);
    //验证img是否导航到位置
    字符串follow_url=driver.findElement(By.xpath(“//div[contains(@class,'advision-holder'))]/a”).getAttribute(“href”);
    System.out.println(遵循url);
    睡眠(5000);
    //跟踪广告并验证登录页上没有
    获取驱动程序(遵循url);
    assertNotEquals(“Home”,driver.getTitle());
    driver.navigate().back();
    
    以下是TestNG的输出:

    org.openqa.selenium.ElementNotVisibleException:尝试使用合成事件单击元素时收到JavaScript错误。我们假设这是因为元素未显示,但可能是由于执行JavaScript时出现其他问题。(警告:服务器未提供任何stacktrace信息)

    如能就这一问题的解决办法提供任何意见,我将不胜感激


    谢谢。

    哪一行引发此异常?您还可以粘贴checkContinueAndAcceptButton()方法的代码吗?我假设这是导致合成事件的原因-因为所有其他行似乎只查找元素并断言isElementPresent。