Booooo
Booooo
using Selenium
Advanced Level Real-Time
Training in SELENIUM Testing
Tool
Content of
Selenium
Introduction
to Testing
Test - Automation
Introduction
Test-Automation Strategy
Overview of Selenium
Components
Selenium IDE & RC
Selenium Web driver 2.0
Selenium Grid
Object Identification
XPATH, Object Locators
Automation
End
Automation Introduction
Automation
Process of Automatio
Unstable
Features of Automation
Testing
Advantages of Automation
Testing
Selenium Introduction
Test
What is Selenium?
Selenium
automates browsers.
Selenium has the support of some
of the largest browser vendors who
have taken (or are taking) steps to
make Selenium a native part of
their browser.
It is also the core technology in
countless other browser automation
tools, APIs and frameworks.
Why selenium?
Selenium is probably the best option
for automated testing of Websites
today.
You
The
Advantages of Selenium
Free!
Can
Overview of Selenium
Components
Selenium IDE - Plugin to Firefox to record and play
test in firefoxand also export tests in different
languages.
Selenium RC- Allows playing of exported test in
different platform/OS.
Selenium Grid -Allows to control lots of selenium
machines.
Selenium Web driver 2.0-Driving a browser natively
as a user would either locally or on a remote
machine using the Selenium Server it marks a leap
forward in terms of browser automation.
Selenium IDE
Easy
Selenium IDE
Firefox
Easy
Not
extension
just a recorder
Intelligent
field selection
will use IDs, names,
or XPath as needed
Selenium IDE
Auto-complete
for all
common Selenium
commands
Walk
through tests
Debug
and set
breakpoints
Save
tests as HTML,
Ruby scripts, or any
other format
Unlike
Selenium IDE
Selenium RC
Webdriver
Works only on
mozilla
Works on latest
versions of almost
all browsers Firefox, IE(6,7,8),
OPera, Chrome
No server required
to start
Server is required to
start
No server required
to start
Core engine is
Javascript based
Core engine is
Javascript based
Interacts natively
with browser
application
Purely Object
oriented API
Cannot move
mouse with it
No need to append
'xpath=\\'
Object Identification
To
Locators
Element Locators
ID: id=foo
Name: name=foo
First ID, then name: identifier=foo
DOM:
document.forms[myform].myDropdown
XPath:
xpath=//table[@id='table1']//tr[4]/td[2]
Link Text: link=sometext
CSS Selector: css=a[href=#id3]
Sensible defaults, e.g. xpath if starts with //
selenium.click("btnG");
Sample Codings of
Selenium
driver. get("http://www.google.com");To open an
application
driver.findElement(By.id("passwd-id"));Finding
Element using Id
driver.findElement(By.name("passwd"));Finding
Element using Name
driver.findElement(By.
Xpath("//input[@id=passwd-id]"));Finding
Element using Xpath
element.sendKeys("some text");To type some data
element. clear();clear the contents of a text field or
text area
driver.findElement(By. Xpath("//select"));Selecting
the value
driver.switchTo().window("window Name");Moving
from one window to another window
driver.switchTo().frame("frame Name");swing from
frame to frame (or into iframes)
driver.switchTo().frame("frameName.0.child");to
access sub frames by separating the path with a dot,
and you can specify the frame by its index too.
driver.switchTo().alert();Handling Alerts
driver.
Navigate().to("http://www.example.com");To
Navigate Particular URL
driver. Navigate().forward();To Navigate Forward
driver. Navigate().back();To Navigate Backward