About Me

Page views

Powered by Blogger.

Followers

Wednesday 29 April 2015


Get Command

Example : driver.get("http://www.bbc.com");

Purpose: This command is use to open a new web page in the current browser.
Command: driver.get("URL");


Get Title Command

Example : driver.getTitle();
Purpose: This command is use to get the title of the current page.


Get Current URL Command

Example : driver.getCurrentUrl()
Purpose: This command is use to get the URL of the page currently loaded in the browser.


Close Command

Example : driver.close();
Purpose: This command is use to close the current window of the browser, if it’s the last window it will close the browser.

Quit Command

Example : driver.quit();
Purpose : This command is use to quit the browser and all the opened windows in the browser.


Get Page Source Command

Example : driver.getPageSource();
Purpose: This command is use to get the source of the last loaded page.


Refresh Command

Example : driver.navigate().refresh();
Purpose: This command is use to refresh the current browser.



0 comments:

Post a Comment

Popular Posts

Copyright © Learn Selenium Yourself | Powered by Blogger
Design by Duan Zhiyan | Blogger Theme by NewBloggerThemes.com