Selenium WebDriver Features

Ratings:
(4)
Views:0
Banner-Img
  • Share this blog:

Selenium WebDriver and its Features

2we can work on all the latest versions like firefox 27,Id10,google chrome 17,safari 5 and opera 18.

2By using selenium RC all the  browser can be launch but it is having the version limitations [google chrome  22, selenium RC, safari 5]

2Not necessary to start the selenium server to run the web driver programs.

2It is lanched only one browser.it means it won’t launch the command history browser.

2Web driver directly maximizes the browser not necessary to use window maximize command.

2By default web, the driver maintains the page load synchronization. If it is a page refresh we need to handle it by using threa.sleep

2It is having the auto-scrolling documents option into the application while executing the script

2we can maintain both RC scripts & web driver scripts in a single package or process.

2we can maintain both the RC load & web driver load in a single class.

2we can take the data from the application very effectively by using a web driver for validation.

**How to launch a browser like a firefox, safari, opera, google chrome &it?

Public class all browsers {

Public webdriver driver;

Public void firefox(){

Driver =new firefox driver();

Driver.get(http://spicejet.com);

}

Public void safari(){

Driver = new safari driver();

Driver .get(http://spicejet.com);

}

Public void opera(){

Driver =new operadriver();

Driver.get(http://spicejet.com);

}

Public static void main(string[] args) {

All browsers a=new all browsers();

a.firefox();

a.safari();

a.opera();

}

Interested in mastering  Selenium Training? Enroll now for FREE demo on Selenium Training.

2How to launch Google chrome browsers?

2To launch Google chrome, the chrome driver exe file should be available,we can download it from the below site

http://chrome driver stories.googleis.com?index.html

2click on 2.9 folders [latest version] and download chrome driver –win32.zip.

2After downloading the above file ,copy the chrome driver exe file and placed in lib folder.

Public void chrome(){

System.setproperty(“webdriver.chromedriver”,”E:webchrome driver. Exe”);

Driver= new chrome driver();

Driver .get(http://spicejet.com);

}

2How to launch IE browser

2To launch IE, the IE driver server should be available, we can download it from the below site

http://docs.seleniumfig.org/download/

2Based on the system type(32/64 bit) download the window

2After downloading the file copy the same excel file and place it in the lib folder.

Public void IE(){

System.set property(“web driver.ie.driver”,”E:IE driver server.exe”);

Driver = new internet explorechrome();

Driver.get(“http://spicejet.com”)  ;

}

Public static void main(string [] args){

All browser a=new all browser();

a.ie();

}

Check out the top Selenium Interview Questions now!

**write a program to register into the mail.in .doc by using a web driver.

Public class register-wd{

Public web driver driver;

Public void open url(){

Driver = new firefox driver();

Driver.got(http://mail.in.com);

}

Public void register() throws exception{

Driver.find element(by.css selection(“input.registernow”)).click();

Driver.find element(by.id”fname”)).sendkeys(“nagesh”);

New select (driver.find element (by.id(“day”))).select by visible tex((“10”);

Thread.sleep(1000);

Driver.find element(by.xpath(“(//input[enal=”ra dinner])[1]”)).click();

Thread.sleep(2000);

For an Indepth knowledge on Selenium, click on below

You liked the article?

Like : 0

Vote for difficulty

Current difficulty (Avg): Medium

Recommended Courses

1/15

About Author
Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.


Stay Updated


Get stories of change makers and innovators from the startup ecosystem in your inbox