IE11中的Selenium堆栈空间(但不是Chrome)

时间:2016-06-22 01:45:33

标签: java selenium internet-explorer-11

我关闭了保护模式,编辑了注册表,确保缩放是100,但是这个selenium脚本抱怨错误“堆栈空间不足(警告:服务器没有提供任何堆栈跟踪信息)”。评论的chromedriver完美无缺。

import java.util.concurrent.TimeUnit; 
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.ie.InternetExplorerDriver; 
import io.github.bonigarcia.wdm.InternetExplorerDriverManager;


public class CssSelectors implements Runnable{

    public static void main(String[] args) throws InterruptedException{
        InternetExplorerDriverManager.getInstance().setup();
        InternetExplorerDriver driver = new InternetExplorerDriver();    
        test(driver);           
    }

    public static void test (WebDriver driver) throws InterruptedException{
        driver.get("https://www.tripadvisor.com/");
        driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); 
        driver.findElement(By.id("searchbox")).sendKeys("tokyo");

        }
}

0 个答案:

没有答案