Let's Start The Test automation with SELENIUM -Part 4
WebDriver Commands
IWebDriver Browser Commands in C#
create a driver object from IWebDriver and press dot key. This will list down all the methods of IWebDriver.
IwebDriver driver = new FirefoxDriver();
diver.
Following image display the all command we can use with IWebDriver
I am gonna explain one by one with examples which are most use
01-Url Command
02-Title Command
Following example for How we can use this command
03-Page Source Command
string IWebDriver.PageSource{ get;} – This method returns the Source Code of the page. Accepts nothing as a parameter and returns a String value.04-Close Command
void IWebDriver.Close() – This method Close only the current window the IWebDriver is currently controlling. Accepts nothing as a parameter and returns nothing.05-Quit Command
void IWebDriver.Quit() – This method Closes all windows opened by the IWebDriver. Accepts nothing as a parameter and returns nothing.Google.com Url navigation example code
output -
This is not whole Out put You can try and see it your self ,Try it :)