12
Welcome June 21, 2012 1

SCQAA-SF Selenium Presentation

Embed Size (px)

DESCRIPTION

SCQAA- San Fernando Valley Chapter 20th June 2012 Meeting

Citation preview

Welcome

June 21, 2012 1

Presentation on

Selenium-Webdriver

Browser automation

• SCQAA-SF (www.scqaa.net) chapter

sponsors the sharing of information to

promote and encourage the improvement in

information technology quality practices and

principles through networking, training and

professional development.

• Networking: We meet once in 2 months in

San Fernando Valley.

• Check us out on LinkedIn (SCQAA-SF)

• Contact Sujit at [email protected] or call

818-878-0834

About SCQAA-SF- A Not-for Profit

Organization

June 21, 2012 3

Membership Benefits:

• Excellent speaker presentations on

advancements in technology and

methodology

• Networking opportunities

• PDU, CSTE and CSQA credits

• Regular meetings are free for members and

include dinner

June 21, 2012 4

Membership Policy

• Recently revised our membership dues policy

to better accommodate member needs and

current economic conditions.

• Annual membership is $50, or $35 for those

who are in between jobs.

• Please check your renewal with Cheryl Leoni.

If you have recently joined or renewed,

please check before renewing again

June 21, 2012 5

Browser automation tool

• Open source

• Works with multiple OS, and browsers.

• Selenium IDE is a plugin that can be

installed to record and run tests.

• Selenium provides an API,and libraries to

support following languages- Java, Ruby,

Python, PHP, Perl, and C#.

What is Selenium?

Components

CORE API

WebDriver

IDE Selenium RC

GRID

Build architecture

ddDEVELOPER

SVN

RRREPOSITORY

JENKINS

BUILD SERVER

IE

9 FF

CH

RO

ME

SELENIUM GRID

MUMULTIPLE NODES

AUT

QA ENGINEER

REPORT

The Document Object Model (DOM) is an application programming

interface (API) for valid HTML and well-formed XML documents. It defines

the logical structure of documents and the way a document is accessed

and manipulated.

Most common locators while traversing DOM

• By ID

• By Class Name

• By Tag Name

• By Link Text

• By CSS

• By By XPATH

DOM and locating UI Elements

import static org.junit.Assert.assertEquals;

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;

import org.openqa.selenium.firefox.FirefoxDriver;

public class NewTest {

public static void main(String[] args) {

WebDriver d= new FirefoxDriver();

d.get("http://www.altavista.com/");

d.findElement(By.id("yschsp")).sendKeys("water");

d.findElement(By.id("yschbt")).click();

d.findElement(By.id("link-1")).click();

System.out.println("Title contains"+" " +d.getTitle());

assertEquals("Water - Wikipedia, the free encyclopedia",(d.getTitle()));

d.close();

}

}

webDriver Import

WebDriver codes

Junit Annotation

Java

WebDriver Link

http://seleniumhq.org/docs/03_webdriver.htm

Firebug link http://getfirebug.com/

R RESOURCES

Eclipse download http://www.eclipse.org/downloads/

://www.eclipse.org/downloads/

http://www.eclipse.org/downloads/

Thank you so much for attending the presentation. If you have any

questions do not hesitate to-

Contact the Presenter:

Sajan at [email protected]

Sujit Ghosh, Program Chair at SCQAA at [email protected]