Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是面试问题之一。
如果隐式等待是说 20 秒,而显式等待是说 10 秒对于 web 元素说 loc1
如果在前 20 秒内无法定位 weblement 会发生什么情况,并且有 10 秒的显式等待,a) 它会首先等待 20 秒,因为这是隐式等待的值,然后再等待 10 秒在抛出未找到的错误元素之前,还是?b) 只有当它无法找到元素时,它才会在隐式等待的前 20 秒内抛出错误?c)是否可以同时使用隐式等待和显式等待,将它们结合使用是否有任何问题。
两者都使用不是一个好习惯。你可以参考这个。
http://makeseleniumeasy.com/2017/07/02/part-6-waits-in-selenium-what-happens-when-we-mix-implicit-wait-and-explicit-wait/