Here we try to configure Selenium Web Driver(Java Client) with Net Beans
Step 1 - Install Java And NetBeans In Machine ............
Download and Install JDK(Java Development Kit) from here .
JDK comes with JRE(Java Runtime Environment) so don't need to download it separately.Try to use new version of JDK.
Download NetBeans from here and install it.We can download full package of NetBeans or only the Java SE NetBeans package.
We may download the combined package of JDK+NetBeans from here and installed the combined package.Using this we don't need to install JDK and NetBeans separately.
NetBeans is just an editor, we may also use Eclipse as an editor. In another post we can see how to configure Eclipse for Selenium WebDriver.
Step 2 - Download Selenium Java Client ............
Download Selenium Client Driver from here .You will find client drivers for other languages there, but only choose the Java client.
After download completed extract the files from Selenium-Java-2.37.0.zip,it look like this
Open the the libs folder we can see more jar files are there like this........
Step 3 - Configure NetBeans IDE With Selenium WebDriver ............
1.Open NetBeans IDE.
2.Goto File->New Project->Categories Java and Projects Java Application and click next.
3.Give the Project Name and Destination where it it will be saved and click finished.
4.Right Click on project which is shown on the left side of NetBeans and select Properties.......
5.Add all jars with in the selenium-2.37.0 folder (selenium-2.37.0 + selenium-java-2.37.0-srcs.jar +All jar in libs folder)......
6.After adding the all jar this should be shown on the NetBeans.....
7.Now we are ready to write code in NetBeans using Selenium WebDriver.Here we write some code like
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package SeleniumWebDriverEx1;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
/**
*
* @author
*/
public class SeleniumWebDriverEx1 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
//Here we initialize the firefox webdriver
WebDriver firefoxDriver=new FirefoxDriver();
//Open the url which we want in firefox
firefoxDriver.get("Http://www.google.com");
}
}
8.We run the project then firefox will be opened and show the google page like this
If we observed the firefox window we can see that WebDriver word is written into the below of this page because it is opened by the Selenium WebDriver.
Read more at http://www.guru99.com/installing-selenium-webdriver.html#7HRV5yfx1bvgAC6G.99
Step 1 - Install Java And NetBeans In Machine ............
Download and Install JDK(Java Development Kit) from here .
JDK comes with JRE(Java Runtime Environment) so don't need to download it separately.Try to use new version of JDK.
Download NetBeans from here and install it.We can download full package of NetBeans or only the Java SE NetBeans package.
We may download the combined package of JDK+NetBeans from here and installed the combined package.Using this we don't need to install JDK and NetBeans separately.
NetBeans is just an editor, we may also use Eclipse as an editor. In another post we can see how to configure Eclipse for Selenium WebDriver.
Step 2 - Download Selenium Java Client ............
Download Selenium Client Driver from here .You will find client drivers for other languages there, but only choose the Java client.
After download completed extract the files from Selenium-Java-2.37.0.zip,it look like this
Open the the libs folder we can see more jar files are there like this........
Step 3 - Configure NetBeans IDE With Selenium WebDriver ............
1.Open NetBeans IDE.
2.Goto File->New Project->Categories Java and Projects Java Application and click next.
3.Give the Project Name and Destination where it it will be saved and click finished.
4.Right Click on project which is shown on the left side of NetBeans and select Properties.......
5.Add all jars with in the selenium-2.37.0 folder (selenium-2.37.0 + selenium-java-2.37.0-srcs.jar +All jar in libs folder)......
6.After adding the all jar this should be shown on the NetBeans.....
7.Now we are ready to write code in NetBeans using Selenium WebDriver.Here we write some code like
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package SeleniumWebDriverEx1;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
/**
*
* @author
*/
public class SeleniumWebDriverEx1 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
//Here we initialize the firefox webdriver
WebDriver firefoxDriver=new FirefoxDriver();
//Open the url which we want in firefox
firefoxDriver.get("Http://www.google.com");
}
}
8.We run the project then firefox will be opened and show the google page like this
If we observed the firefox window we can see that WebDriver word is written into the below of this page because it is opened by the Selenium WebDriver.
Step 1 – Install Java on your computer
Read more at http://www.guru99.com/installing-selenium-webdriver.html#7HRV5yfx1bvgAC6G.99
Step 1 – Install Java on your computerRead more at http://www.guru99.com/installing-selenium-webdriver.html#7HRV5yfx1bvgAC6G.99
Read more at http://www.guru99.com/installing-selenium-webdriver.html#7HRV5yfx1bvgAC6G.99
Step 1 – Install Java on your computer
Read more at http://www.guru99.com/installing-selenium-webdriver.html#7HRV5yfx1bvgAC6G.99
Read more at http://www.guru99.com/installing-selenium-webdriver.html#7HRV5yfx1bvgAC6G.99
Step 1 – Install Java on your computer
Read more at http://www.guru99.com/installing-selenium-webdriver.html#7HRV5yfx1bvgAC6G.99
Read more at http://www.guru99.com/installing-selenium-webdriver.html#7HRV5yfx1bvgAC6G.99
Step 1 – Install Java on your computer
Read more at http://www.guru99.com/installing-selenium-webdriver.html#7HRV5yfx1bvgAC6G.99
Read more at http://www.guru99.com/installing-selenium-webdriver.html#7HRV5yfx1bvgAC6G.99
Nice post
ReplyDeleteVery good and detailed effort. Really appreciate.........
ReplyDeleteReally Nice and Understandable tutorial. Pretty much helpfull for new larners ....
ReplyDeleteHelped me to configure NetBeans. Thanks.
ReplyDeleteThank you, I can configure NetBeans.
ReplyDeletethank you very much. Big Help
ReplyDeleteNice post but it didn't get me 100% there. I had a Java exception and had to download and add the Selenium stand alone JAR too. Then it worked.
ReplyDeleteI am really sorry for that this post can not help you 100%.But here each step executed by me and get success then I post it here. I can not understand why it can not work for you.Can you please told me the java exception?Selenium client jar version?did you add selenium-2.xx.0 + selenium-java-2.xx.0-srcs.jar in your project lib.This jars are located outside of the downloaded selenium lib folder.
DeleteThis comment has been removed by the author.
ReplyDeleteHi Arjun, thanks for the excellent post. I've been struggling all day to get NetBeans working until I found your post. I too had the same problem as Chris above and found the resolution on stackoverflow: http://stackoverflow.com/questions/5134953/noclassdeffounderror-in-java
ReplyDeleteIf only I'd scrolled down these comments first I would have found the cause :-)
Nice post. However it opens Firefox 32 but do not set any url later. Do you know where is the problem?
ReplyDeleteSorry for late reply.......Can You please download the new WebDriver java client and configure it.
DeleteThank you Arjun - great post.
ReplyDeleteI had the "java.lang.NoClassDefFoundError" error as Chris.
ReplyDeleteAdded all JARs in libs folder + selenium-java-2.44.0.jar & fixed.
Thanks.
Thank you so much!! It was so easy for what i was trying to past many days! Thanks for the effort!
ReplyDeleteFantastic post. Thank you for your support.
ReplyDeletegreat post
ReplyDeleteYes, I also found Class not found exception. It can be fixed by importing all the jar in lib folder.
ReplyDeletePreviously I have imported just folder under lib, it will not work.Select all the jar inside from the folder and put directly under lib folder.
Thanks for this post. It is of great help!
ReplyDeleteman, this tutorial was helpfull for me. thanks very much for this.
ReplyDeleteI really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Netbeans, kindly contact us http://www.maxmunus.com/contact
ReplyDeleteMaxMunus Offer World Class Virtual Instructor led training on Netbeans. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
For Demo Contact us.
Nitesh Kumar
MaxMunus
E-mail: nitesh@maxmunus.com
Skype id: nitesh_maxmunus
Ph:(+91) 8553912023
http://www.maxmunus.com/
This is very good content you share on this blog. it's very informative and provide me future related information. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
ReplyDeleteSelenium online training
Selenium certification training
Selenium online course
Selenium training course
This blog helpful to me..good content share to all ...Thanks for this valuable information sharing to with us!!!
ReplyDeleteAndroid Training in Chennai | Certification | Mobile App Development Training Online | Android Training in Bangalore | Certification | Mobile App Development Training Online | Android Training in Hyderabad | Certification | Mobile App Development Training Online | Android Training in Coimbatore | Certification | Mobile App Development Training Online | Android Training in Online | Certification | Mobile App Development Training Online
valuable information.. but if u still looking for top 10 web hosting companies visit Top 10 Web Hosting Companies
ReplyDeletefor detailed information.
I really enjoy the blog article .Much thanks again.
ReplyDeletepython training
angular js training
selenium trainings
data science training
ReplyDeletepython training
angular js training
selenium trainings
sql server dba training
Testing tool training