Selenium-Firefox不等待最新版本61.0.1的页面加载

时间:2018-07-15 08:00:07

标签: selenium-firefoxdriver

我正面临页面加载问题,因为页面无法加载,并且移至下一步。

仅在firefox上解决此问题,在chrome上工作正常。

这是错误吗?

这是我正在使用的驱动程序代码

    if (GetBrowser.equalsIgnoreCase("Firefox")) {
 //Now working for Firefox driver

 logg.info("Enters in Firefox Browser Condition");
 System.setProperty("webdriver.gecko.driver", ".\\src\\main\\resources\\Firefox_win32\\geckodriver.exe");
 logg.info("Browser system property path Verified");
 driver = new FirefoxDriver();
 logg.info("Firefox Browser opens successfully");
 driver.navigate().to(GetUrl);
 logg.info("Url Opened successfully in browser");
 driver.manage().window().maximize();
 assertEquals(LoginPageTitle, driver.getTitle());
 logg.info("Login assertion verified");
 driver.manage().timeouts().implicitlyWait(Long.parseLong(PageImplicit), TimeUnit.SECONDS);
 logg.info("ImplicitTime Defined In browser function");
 driver.manage().timeouts().pageLoadTimeout(Long.parseLong(PageLoadTime), TimeUnit.SECONDS);
 logg.info("Page Load time Defined In browser function");

这是登录页面代码。

 public void loginpage_function(String loginuname,String loginpassword) 
    {
        MainDriverClass objdriver=new MainDriverClass();
                UrlValReturn=objdriver.getConfigValue("MainUrl");
                logg.info("Get the Value of UrlValReturn = " +UrlValReturn);
                driver.findElement(login_email).sendKeys(loginuname);
                logg.info("UserEmail enters in email textbox");
                driver.findElement(login_password).sendKeys(loginpassword);
                logg.info("UserPassword enters in password textbox");
                driver.findElement(submit_login).click();
                logg.info("Submit button click successfully and navigate to default landing page");

0 个答案:

没有答案