To invoke/open browsers using automated tools and run tests on them, browser vendors have exposed their browser API which can be used by the Selenium WebDriver interface. Almost all the major browsers have their browser-specific driver classes that implement this interface like ChromeDriver, IEDriver, FirefoxDriver, SafariDriver, etc.
We need to download the drivers into our system.
Before calling browser, we must set system property specific to the browser For example, For Chrome browse we need to set below property
//Invoking chrome driver in your suite
We can follow same steps for other browsers like Firefox, IE/Edge and Safari browsers. We just need to download their respective drivers and set the property for them and call them like
Note: Replace browserDriver with the browser for which we had set the property and want to invoke for our testing purpose.
Post a Comment