Thursday, March 19, 2015

SELENIUM WEBDRIVER BROWSER COMMANDS:

SELENIUM WEBDRIVER BROWSER COMMANDS:



Command: driver.get(“URL which need to be open”);
Used for: Open webpage in a browser
Ex: driver.get(“http://jaingourav999.blogspot.com”);
Command: driver.gettitle()
Used for: Get title of current page
Ex: driver.gettitle();
Command: driver.getPageSource()
Used for: Get source of current page
Ex: driver.getpagesource();
Command: driver.getCurrentUrl()
Used for: Get source of current page
Ex: driver. getCurrentUrl ();
Command: driver.navigate.refresh()
Used for: Refresh the current page
Ex: driver.navigate.refresh ();
Command: driver.close()
Used for: Close the current window of browser
Ex: driver.close();
Command: driver.quit()
Used for: quit the browser and all opened browser
Ex: driver.quit();