Prerequisites for learning WebDriver
Basic Core JavaHow to start work with WebDriver/Selenium First Script
Three simple Steps for writing First script
1.Download Jar files for Selenium
2.After that configure Jar files in Eclipse.
3.Click on Eclipse.
4.Choose Your WorkSpace.Click on ok.
6.You will get this screen.
7.Go to File>JavaPrject
7.Type name for the project.Project name should be meaningfull.Click on Finish.
8.Click on traingle>Select Src>Right click
9.Select Package and type/Enter name for package.
10.Package name should be in small letter.
11.Now select Package>Click on class
12.Type name and Click Finish.
13.Right Click on project>Go to Properties>Select Java Build Path
14.Click on Add External Jar>Give path of your Selenium Jar Files>Add these JarFiles.Add all the Jar files which are in lib Folder.Click on Ok.Now Selenium Jar is configured.
15.Now click on class And start Write Script into that class
16.Now click on WebDriver written in script and and import the class of WebDriver and Import Firefox Driver.
17.After importing you will get this screen.Now you can start working with Webdriver methods.Here driver is an refernce of WebDrive.Here we are opening the FirefoxDriver.
19.Now driver.get method will launch the url(url which you will enter)
For opening the url we will always use driver.get(urlname).





0 comments:
Post a Comment