How does implicit wait of Protractor interact with explicit wait?

后端 未结 3 944
自闭症患者
自闭症患者 2020-12-16 04:16

The misunderstanding happens when implicit wait is less than explicit:

var timeOut = 5000;
var search = element(by.xpath(`//*[@name=\'qwer\']`));
browser.man         


        
3条回答
  •  猫巷女王i
    2020-12-16 05:04

    That's a great question and these unpredictable wait times when using a combination of implicit and explicit waits has been warned & stated in Selenium documentation. browser.wait() is an explicit wait and you are using that in combination with a implicit wait - browser.manage().timeouts().implicitlyWait()

    Waiting is having the automated task execution elapse a certain amount of time before continuing with the next step. You should choose to use Explicit Waits or Implicit Waits.

    WARNING: Do not mix implicit and explicit waits. Doing so can cause unpredictable wait times. For example setting an implicit wait of 10 seconds and an explicit wait of 15 seconds, could cause a timeout to occur after 20 seconds.

提交回复
热议问题