Why my test is throwing Exception-Unable to locate element in webdriver?

前端 未结 5 1002
鱼传尺愫
鱼传尺愫 2021-01-24 06:41
package testproject;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.*;
          


        
5条回答
  •  一整个雨季
    2021-01-24 07:22

    I faced similar problem, issue resolved after setting timeout.

    Webdriver driver = new FirefoxDriver();
    driver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);
    

    Not sure whats the role of timeout here though.

提交回复
热议问题