Web driver back selenium:-

Adv:-

1) we can write both web driver selenium commands in a single class

2) we can convert the selenium RC program to a web driver.  

**Describe the steps to convert the selenium RC program to web driver?

2comment on the default selenium object

2create web driver and web driver back selenium objects.

2comment on the command selenium.start(); became we can’t launch more sessions[browsers] in a single execution.

Public webdriver driver;

Public selenium selenium;

Public void open url()  {

Driver =new firefoxdriver();

Selenium= new webdriverbackedselenium(driver,”http-url”);

Selenium.open(“http:,url”);

}

Inclined to build a profession as Selenium Developer? Then here is the blog post on 
Selenium Training In Hyderabad.

SIKULI:-

  • It is also an open-source automation tool developed in java
  • We are using sikuli has an add on to selenium to support desktop, flex, flash and web elements also
  • We can download sikuli from the below site
  • http://launchpod.net/sikuli/+download
  • Download the “sikuli-setup-jar”file.
  • Create a new folder copy sikuli-setup-jar file passed it into some folder
  • Double click on sikuli-setup-jar file it displays a message and follow the instruction.
  • Go run àcmdàopen command window à type “cd D: siluil’ à click enter à type “D:”à click enter à type “runsetup.cmd” à click enter
  • We are going to use the sikuli ide
  • Go to the path where we have posted the sikuli setup jar file[e://sikuli]
  • Double click on run ide.cmd file
  • It opens sikuli ide
  • Cli ck on take screenshot option and capture the respective image.
  • Create a folder in any desired drive anew folder with “sikuli” extent ion and stores the screenshots into that folder.

  Note: By default sikuil create a new folder with “.Siluli” sefinition and stores the screen shots into that folder Package sikuli;

Import org.sikuli.script.screen;

Import org.testing.anitation.test;

Public class sample {

Public screen s=new screen();

@test

Public void f() throws exception {

s.click(“e://workspace-10 am\sikulimerger.sikuli\(39[]”ghjhpng”);

}

}

Check out the top Selenium Interview Questions now!

By using sikuli we can perform below actions

1) type();

2) click();

3) double click();

4) Right-click();

5) over():-It performs mouse over actions

6) drag-drop():-It is to perform drag & drop action We can drag elements from source to destination.

7) exits():-It works the same as like is displayed or in element present in selenium.

2write a program to mouse over on “about us” then click on “carrier” in spicejet.com by using web driver &sikuli?

Public class mouseover {

Public webdriver driver;

Public screen s;

@test

Public void f() throws exception {

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

s.hover(“e:\workspace 10 am\sikuliimages.sikuli\[]………,png”);

driver.find element(by.linktest(“carner”)).click();

}   

Assignments:-

*write a program to compare Gmail by using web driver & sikuli?

2write a program to drag a file and drop it in any target folder ?

For an In-depth knowledge on Selenium, click on below