selenium basic

15
Dasun Eranthika SELENIUM BASIC

Upload: dasun-eranthika

Post on 11-May-2015

2.653 views

Category:

Technology


0 download

DESCRIPTION

Selenium is open source tool use for webpages automate.

TRANSCRIPT

Page 1: Selenium basic

Dasun Eranthika

SELENIUM BASIC

Page 2: Selenium basic

Selenium Basic | Dasun Eranthika

2

Content

What is Selenium? Languages supported by Selenium Browsers supported by Selenium OS supported by Selenium Components of Selenium

How to install Selenium IDE How to configure Selenium WebDriver XPath

11/18/2012

Page 3: Selenium basic

Selenium Basic | Dasun Eranthika

3

What is Selenium?

Selenium is an open source automation testing tool for web based applications.

Languages supported by Selenium Java (Famous) C# Ruby Python PHP Pearl

Should know at least on programming language to digging deeper Selenium.

11/18/2012

Page 4: Selenium basic

Selenium Basic | Dasun Eranthika

4

What is Selenium? (cont.)

Browsers supported by Selenium Mozilla Firefox(till latest version) IE 6,7,8 Google chrome Opera 8,9,10

Operating Systems supported by Selenium Windows Mac Linux Unix Many more…

11/18/2012

Page 5: Selenium basic

Selenium Basic | Dasun Eranthika

5

What is Selenium? (cont.)

Components of Selenium

Selenium

Selenium IDE

Selenium RC

WebDriver Grid

11/18/2012

Page 6: Selenium basic

Selenium Basic | Dasun Eranthika

6

What is Selenium? (cont.)

Qualities of Selenium components

11/18/2012

Page 7: Selenium basic

Selenium Basic | Dasun Eranthika

7

How to Install Selenium IDE

Selenium IDE is only compatible with Mozilla Firefox.

It can directly download as an add-on to Firefox browser from Selenium official website (http://seleniumhq.org/download/).

So, it’s better to browse with Firefox.

11/18/2012

Page 8: Selenium basic

Selenium Basic | Dasun Eranthika

8

How to Install Selenium IDE (cont.)

Go to http://seleniumhq.org/download/ link and click to download Selenium IDE

Allow it to install as Add-onClick “Install Now” button of the pop-up menu and restart the browser

Click Firefox> Web Developer> Selenium IDE or press Ctrl+Alt+S to get

Selenium IDE

Selenium IDE

11/18/2012

Page 9: Selenium basic

Selenium Basic | Dasun Eranthika

9

How to configure WebDriver

Selenium WebDriver can be downloaded from http://seleniumhq.org/download/

Also get Selenium Javadocs on the site. Javadocs will contain all the information about the architecture of WebDriver

While developing the WebDriver code, you can actually rely on that architecture and refer to them in case you are stuck in selenium.

Selenium RC has a jar file called selenium-server.jar which will be needed to start the server

In selenium WebDriver, there is no server which you need to start.

11/18/2012

Page 10: Selenium basic

Selenium Basic | Dasun Eranthika

10

How to configure WebDriver (cont.) In selenium WebDriver, there is no

server which you need to start. Selenium IDE is having the core engine

which is based on JavaScript can also write your own code in java

script and extend the functionality of IDE (e.g.: we can read the test data from XML in IDE)

11/18/2012

Page 11: Selenium basic

Selenium Basic | Dasun Eranthika

11

How to configure WebDriver (cont.) Open Eclipse and configure the .jar file in

particular project properties.1. Go to the Properties of the

Application>Java Build Path> Libraries2. Click on “Add External JARs” button and

add those jar files to the project.

11/18/2012

Page 12: Selenium basic

Selenium Basic | Dasun Eranthika

12

How to configure WebDriver (cont.)

11/18/2012

Page 13: Selenium basic

Selenium Basic | Dasun Eranthika

13

XPath

XML Path Language, is a query language for selecting nodes from an XML document

addition, Xpath may be used to compute values (e.g., strings, numbers, or Boolean values) from the content of an XML document

Xpath was defined by the World Wide Web Consortium (W3C).

I’ll come with detailed slideshow about Xpath later. 11/18/2012

Page 14: Selenium basic

Selenium Basic | Dasun Eranthika

14

For more readings, browse http://seleniumhq.org/, the official Selenium website

To download the PDF, http://www.mediafire.com/view/?f6lcv69wnbhd6c6

11/18/2012