Thursday, July 28, 2016

FAQ of Selenium Webdriver

What is the difference between driver.Close() and driver.Quit () method?
Close() - It is used to close the browser or page currently which is having the focus. 

Quit() - It is used to shut down the web driver instance or destroy the web driver instance (Close all the windows)

Selenium WebDriver - What is the difference between Assert and Verify?
Assert- it is used to verify the result. If the test case fail then it will stop the execution of the test case there itself and move the control to other test case.
Verify- it is also used to verify the result. If the test case fail then it will not stop the execution of that test case.

Selenium WebDriver - What is the difference between setSpeed() and sleep() methods?
Both will delay the speed of execution.
Thread.sleep () : It will stop the current (java) thread for the specified period of time. Its done only once
It takes a single argument in integer format
Ex: thread.sleep(2000)- It will wait for 2 seconds
It waits only once at the command given at sleep
SetSpeed () : For specific amount of time it will stop the execution for every selenium command.
It takes a single argument in integer format
Ex: selenium.setSpeed(“2000”)- It will wait for 2 seconds
Runs each command after setSpeed delay by the number of milliseconds mentioned in set Speed
This command is useful for demonstration purpose or if you are using a slow web application

Selenium WebDriver and Selenium IDE - What Selenium functionality uses wildcards?
Regular expression can use wildcards.

How do you get the current page URL ?
driver.getCurrentUrl(); 

1 comment:

Unknown said...

Hello,
The Article on FAQ of Selenium Webdriver is nice give detail information Selenium Web Drive .Thanks for Sharing the FAQ on Selenium Web Driver. Software Testing Company