It is very simple to write the Selenium Webdriver programs to perform automation testing.
Here is the very basic program to open hello selenium blog using Selenium Webdriver script.
Here is the very basic program to open hello selenium blog using Selenium Webdriver script.
Java Source code:
package com.helloselenium.selenium.test; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class OpenHelloSeleniumBlog{ public static void main(String[] args) { WebDriver driver = new FirefoxDriver(); driver.get("http://helloselenium.blogspot.com"); driver.quit(); } }
Detailed explanation for the above program is as follows:
package com.helloselenium.selenium.test;
Following code is the required packages for Selenium Webdriver.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
Following code is to initialize the Firefox driver.
WebDriver driver = new FirefoxDriver();
Following code is to open the hello selenium blog in browser.
driver.get("http://helloselenium.blogspot.com");
driver.navigate().to("http://helloselenium.blogspot.com");
driver.quit();
driver.close();
0 Comments
What would you like to add in my list? I look forward to reading your comments below.