Welcome Selenium Beginners !!
Here am going to explain some basics things of selenium webdriver like how to install, how to run your first test script etc.,
Introduction of Selenium
Selenium is an Open Source Automation Testing tool used to automate various types of applications or software products. It consists of three main parts Selenium IDE, Selenium RC & Selenium WebDriver. Nowadays, we are using WebDriver to automate applications.
Selenium IDE is basically something having record & playback options which present in the every automation tool like QTP, Sliktest etc. Selenium IDE is that, it supported in only Firefox browser.
Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.
WebDirver supports the multiple languages. Main advantage over the Selenium RC is that we don’t have to start the server in the Selenium WebDriver. Additional advantage is that it supports the Android Testing & iPhone testing as well.
5 Steps to Install Selenium WebDriver:
Step 1: Download and install Java Development Kit (JDK) in PC which is correspond to your OS.
Step 2: Download Eclipse and Install in your local system (PC) .
Step 3: Next download Java Client Driver
Step 4: After all done this then, Open the installed Eclipse and goto File -> New -> Java Project. Then, Dialog box will open in that give Project Name and then click Finish button.
Step 5: Then Create a Class under Java project:
You will see the “src“ folder & Right Click on the “src” folder & create the new class as “Webdriver_class” (you can give any name related).
Right click on Project Name what you given & select Properties option. Select “Java Build Path” option in the left side of the Properties dialog box -> Click on Libraries tab .
Click on “Add External JARs..” button.
Select the extracted Selenium Java Client Driver folder downloaded & add all JAR files present in the inside & outside of the “libs” folder. Once you select these JAR files and Click on OK in the Properties dialog box to import.
Run your first Selenium WebDriver script.
Once you complete the above steps then you are ready to execute your first WebDriver script. You just copy paste the code written below & click on Run button to execute your first script.
These are the steps i followed for installing and i created this topic for all other selenium Beginners. If its useful give your valuable comments for me to write more topics regarding selenium webdriver. For more reference you can visit this site. We can see about Firebug, XPath Checker in next blog post.
Here am going to explain some basics things of selenium webdriver like how to install, how to run your first test script etc.,
Introduction of Selenium
Selenium is an Open Source Automation Testing tool used to automate various types of applications or software products. It consists of three main parts Selenium IDE, Selenium RC & Selenium WebDriver. Nowadays, we are using WebDriver to automate applications.
Selenium IDE is basically something having record & playback options which present in the every automation tool like QTP, Sliktest etc. Selenium IDE is that, it supported in only Firefox browser.
Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.
WebDirver supports the multiple languages. Main advantage over the Selenium RC is that we don’t have to start the server in the Selenium WebDriver. Additional advantage is that it supports the Android Testing & iPhone testing as well.
5 Steps to Install Selenium WebDriver:
Step 1: Download and install Java Development Kit (JDK) in PC which is correspond to your OS.
Step 2: Download Eclipse and Install in your local system (PC) .
Step 3: Next download Java Client Driver
Step 4: After all done this then, Open the installed Eclipse and goto File -> New -> Java Project. Then, Dialog box will open in that give Project Name and then click Finish button.
Step 5: Then Create a Class under Java project:
You will see the “src“ folder & Right Click on the “src” folder & create the new class as “Webdriver_class” (you can give any name related).
Right click on Project Name what you given & select Properties option. Select “Java Build Path” option in the left side of the Properties dialog box -> Click on Libraries tab .
Click on “Add External JARs..” button.
Select the extracted Selenium Java Client Driver folder downloaded & add all JAR files present in the inside & outside of the “libs” folder. Once you select these JAR files and Click on OK in the Properties dialog box to import.
Run your first Selenium WebDriver script.
Once you complete the above steps then you are ready to execute your first WebDriver script. You just copy paste the code written below & click on Run button to execute your first script.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Webdriver_class
{
public static void main(String[] args)
{
WebDriver driver = new FirefoxDriver();
driver.get("http://google.com");
System.out.println(driver.getTitle());
driver.close();
}
}
These are the steps i followed for installing and i created this topic for all other selenium Beginners. If its useful give your valuable comments for me to write more topics regarding selenium webdriver. For more reference you can visit this site. We can see about Firebug, XPath Checker in next blog post.