How can we get exact time to load a page using Selenium WebDriver?
We use Thread.sleep
We use implicitlyWait
we use WebDriverWait
but How can we get exact time to load a page using Selenium WebDriver?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are trying to find out how much time does it take to load a page completely using Selenium WebDriver (a.k.a Selenium 2).
Normally WebDriver should return control to your code only after the page has loaded completely.
So the following Selenium Java code might help you to find the time for a page load –
If this does not work then you will have to wait till some element is displayed on the page –