Selenium-IE WebDriver无法使用get()打开URL

时间:2019-07-09 21:22:47

标签: selenium internet-explorer selenium-webdriver

IE WebDriver成功打开IE浏览器,但无法导航到我指示的URL。

我使用了 driver.get(url) 这是代码段:

  public class StationCheckStepDef  {

    public static long DEFAULT_WAIT = 20;
    protected static WebDriver driver;

    @Given("^User Opens the Station Check Application$")
    public void open_the_Station_Check_Application() throws Throwable {
    // Write code here that turns the phrase above into concrete actions
        System.out.println("This step opens the Station Check app");
        System.setProperty("webdriver.ie.driver", "C://Projects//stationcheckstesting//src//test//resources//drivers//IEDriverServer.exe");                 
        driver = new InternetExplorerDriver();                  
        driver.manage().timeouts().setScriptTimeout(DEFAULT_WAIT,TimeUnit.SECONDS);
        driver.manage().window().maximize();    
        driver.get("http://google.com");


    }

code snippet

0 个答案:

没有答案