Download - Tech talks (Automation on Selenium Web Driver. How to begin & implement)

Transcript
Page 1: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 1

Taras LytvynTech Talks: Web Driver Implementation and Features

Page 2: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 2

Contents- Automation implementation (+ migrating)- How to update skills for “automation ability”

- Selenium WebDriver Features development and implementation in examples (overview of situations that “are not automated”)

- Selenium WebDriver “advanced level “ tricks

Page 3: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 3

Starting Automation on Selenium WebDriver

You are manual tester and want to

implement automation testing on your project on

WebDriver.

You currently have automation on your

project based on Selenium 1 and want to make a restyling with

WebDriver.

Page 4: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 4

Existing Automation on Selenium

Framework onSelenium 1

Framework onSelenium 2

Implementation, updating

1st Case to Automate on Selenium

Page 5: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 5

Migrating features (Case 1)

- Use Pattern approach - Build Framework

Getting Started - launching

Simon Stewart Migration approach

Clicking and Typing is More CompleteWaitForPageToLoad Returns Too SoonFinding By approach

Executing Javascript Doesn’t Return Anything

Comparisons

To make life easier

Page 6: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 6

MANUAL Testing

Update Skills 1 {…} Practice in Record/Playback

Update Skills 2 {…}

Build Simple Framework

2nd case to Automate on Selenium

Implement and develop dif. features

Page 8: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 8

From Manual Testing (Case 2)

- HTML, CSS, JS syntax

- Install:Selenium IDE, firebug,firepath

- Watch Record/Playback Selenium IDE Tutorial- Create account on automated-testing.info

- Watch “Locators” Tutorial

- Watch “RegExps” Tutorial/Perform RegExp practice here

Page 9: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 9

From Manual Testing (Case 2)

- Learn JUnit/Test NG Specification and features

- Improve programming skills with Selenium IDE + Eclipse + JUnit - Try to build your first Automation Framework

- Refactor your code, create extensions, stubs, wraps, etc.

Advanced automation

- Try to automate things “that couldn’t be automated”

Page 11: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 11

“Things couldn’t be automated”CanvasCanvas

Trick with checking the image correctness

- With JS execution (getValue())- Sikuli Java Library

Page 12: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 12

“Things couldn’t be automated”Working with more then 1 tab

Trick with checking the image correctnessResolve: JS injection for creating anchor tag with url of needed page

Handle first window, from that test is started

Page 13: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 13

Write manipulators for switching

Page 14: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 14

“Things couldn’t be automated”Windows Upload Pop-Up

Trick with checking the image correctness

Page 15: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 15

To begin automate with Selenium WebDriver successfully …

Selenium WebDriver is free powerful tool for web automationSelenium WebDriver has excellent web support

- SET OF SKILLS

- PRACTICE

For advanced using… - Forums, blogs (automated-testing.info) - Look for difficult situations and try to automate them

Page 16: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 16

< QUESTIONS ? >

Page 17: Tech talks (Automation on Selenium Web Driver. How to begin & implement)

© 2012GlobalLogic Inc. 17

Taras Lytvynautomation QC in Global Logic inc.email : [email protected]: http://testers.lviv.ua/automation_blogskype: tasryk