Write a program to add wait for load the page in selenium

— Below is the program. Add it into the @before hook to make sure everytime a new scenario run it will be executed.
— Add it where the new page will be loaded using any action performed.

I hope it will be helpful.

How to read JSON file in Java

If you are using Java maven project below are steps.

1. Open pom.xml file and add below dependencies.

2. Create a java class and use below code

3. Run the Java class.

How to execute Javascript DOM capabilities in Java automation

1. How to open another tab and switch to it.

2. How to get the value of CSS locator from a DOM in the console

3. How to run any CSS or XPTH locator on the console using querySelector