How to fix Webdriver wait or implicitly wait deprecated message error in Selenium webdriver?

preview_player
Показать описание
In this video we have shown how to fix below error related to implicitly wait and explicitly wait:
@Deprecated
Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found.”
Or
“The constructor WebDriverWait(WebDriver, long) is deprecated
3 quick fixes available:
@ Add @SuppressWarnings ‘deprecation’ to ‘wait’
@ Add @SuppressWarnings ‘ deprecation’ to ‘main()’
Configure Problem severity”

public class DemoDeprecatedMethod {


public static void main(String[] args) {
// TODO Auto-generated method stub
WebDriver driver = new ChromeDriver();

/* Below are depracated ones in selenium 4


WebDriverWait wait = new WebDriverWait(driver, 120);

*/

/* Solution

Or

*/



}

}

-
Рекомендации по теме
Комментарии
Автор

Thank you so much, it really useful for me when am facing deprecated error

Sabarinathanakc
Автор

Yes I understaand but this will work for one . Everytime i cant do this, Please suggest a good way like implicit wait.

smfdcqu
Автор

Hello, I tried using as you mentioned.I am getting an error like[ofseconds(int) is undefined for type Duarion.Could you please help me here

sireeshach
Автор

just zoom little more while making next video

Im_og