www.time2test.co.uk presents

Selenium Bootcamp
Webdriver Training

!1
Join us and Book Online
★ Book
★ One

your selenium webdriver training with us

day - intensive 10 hours - 8am to 6pm

★ L...
book online

Bootcamp locations
Dublin

London

Berlin
Brussels

Delhi

Vancouver

New York

www.time2test.co.uk

South Af...
Berlin September 2013
www.time2test.co.uk

!4

www.seleniumbootcamp.com
Dublin November 2013
www.time2test.co.uk

!5

www.seleniumbootcamp.com
Dubai January 2014
www.time2test.co.uk

!6

www.seleniumbootcamp.com
Book today

www.time2test.co.uk

!7

www.seleniumbootcamp.com
Start
!8
overview
•

introductions and background

•

90% practical training

•

10% theory and coffee

www.time2test.co.uk

!9

ww...
who we are?
•

Time2test Limited ( UK) based training company

•

Specialise in training for testers

•

Training Location...
Fast paced course
•

We have limited time

•

We can follow up via Skype if necessary

•

Email us info@time2test.co.uk wi...
About the trainer

“Hi, I am the trainer. This slide is about me and my
technology background.”

www.time2test.co.uk

!12
...
Agenda
•

7:45 - 8am - Introductions and Coffee

•

8am - 10am - Morning session
Timings are
approximate

•

Coffee Break ...
Training Room
•

Fire Exits

•

Water

•

Lavatories

•

Breaks and lunch

•

Wifi connection

www.time2test.co.uk

!14

ww...
what we will cover?
•

Selenium 2 WebDriver API

•

Handling Alerts

•

Using WebDriver to navigate web applications

•

W...
Pre-requisites
•

Java programming knowledge

•

jUnit knowledge

•

Eclipse IDE

•

Setup on your own machine

www.time2t...
What do you already know?
•

Spend 5 minutes on telling us what you already
know about Selenium Webdriver and how you have...
Style of teaching
•

Follow the the examples created by the trainer and
then try them out on your machine.

•

Help each o...
course objectives
•

spend 5 mins and note down your objectives and
pass them over to the trainer.

•

We want to meet you...
Environment Setup
!20
overview
•

Eclipse IDE or IntelliJ IDEA

•

jUnit for test automation framework

•

Maven for package dependencies

•

Fi...
What is Eclipse IDE

•

If you don’t have previous experience then just
follow the trainers’ examples

•

Development plat...
What is jUnit?

•

test automation framework to help organise tests
with improved reports

www.time2test.co.uk

!23

www.s...
What is Maven?

•

configuration tool to manage package
dependencies and versions without the headache.

www.time2test.co.u...
What is Firefox?

•

where have you been?

•

webdriver and Firefox show much love

www.time2test.co.uk

!25

www.selenium...
webdriver API
!26
overview
•

walkthrough of the key webdriver api

•

commands

www.time2test.co.uk

!27

www.seleniumbootcamp.com
API - must know
Webdriver - control the browser
•

Webdriver driver = new FirefoxDriver();

WebElement - work with element...
API - must know
•

void get(“url”) - open the web page

•

void quit() - close the browser

•

List<WebElement> findElement...
API - find Elements
•

There are many different ways to find elements

•

By.id(“objectId”)

•

By.linkText(“textUsedInTheLi...
API - operations
•

void click() - click on an element

•

void submit() - perform a submit

•

String getValue()

•

void...
API - windows and frames
working with Browser Windows
•

driver.getWindowHandles()

•

driver.switchTo().window.(“window_n...
commands map
•

http://www.mindmeister.com/280141421/selenium-2-webdriver-commands

•

mind map showing a high level view ...
locating webElements
!34
overview
•

use firebug/chrome developer tools to help with
locating webElements

•

cssSelectors

•

XPATHS

•

id

•

nam...
xpaths v cssSelectors
•

Try to use cssSelectors over XPATHS

•

your automation scripts will run faster

•

use XPATHs to...
xpaths
•

This notation // for xpaths

•

follow the trainer’s examples

•

use a tool to help determine xpaths

www.time2...
xpaths - firepath

•

great tool to assist with xpath determination

•

use with firebug on firefox

www.time2test.co.uk

!38...
css selectors
•

reference sheet

•

http://www.w3schools.com/cssref/
css_selectors.asp

•

Too much to learn in one day

...
css selectors 2
•

partial match on attribute values

^=

$=

*=
www.time2test.co.uk

input[id^=‘ctrl’]

Starting with:
Fo...
css selector gadget
•

chrome tool extension

•

Search in google for “CSS
Selector Tester”
!

www.time2test.co.uk

!41

w...
dynamic elements
Does the ID of your element dynamically change?
<p id="bootcamp_dynamic_1234">This p tag has a dynamic id...
jUnit and Hamcrest
!43
overview
•

what is jUnit?

•

what is Hamcrest?

•

how do we use it?

www.time2test.co.uk

!44

www.seleniumbootcamp.com
jUnit
•

@Before

•

@BeforeClass

•

@Test

•

@After

•

@AfterClass

www.time2test.co.uk

!45

www.seleniumbootcamp.com
jUnit

•

Pick up the style used in our examples and then
apply them

www.time2test.co.uk

!46

www.seleniumbootcamp.com
hamcrest
•

Hamcrest is a framework for writing matcher
objects allowing 'match' rules to be defined
declaratively

•

intr...
hamcrest usage
•

A good starting place is the assertThat() method
that can now almost always be used in place of the
trad...
hamcrest matchers
•

allOf()

•

instanceOf()

•

any()

•

is()

•

anyOf()

•

not()

•

anything()

•

notNullValue()

...
test Structure
•

good style
•

void setUp()

•

void tearDown()

•

all tests should finish with an assertion

•

element ...
Alerts and Cookies
!51
overview

•

how to handle alerts?

•

how to handle cookies?

www.time2test.co.uk

!52

www.seleniumbootcamp.com
alerts
driver.switchTo().alert().accept();
Alert Demo
http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert
http://ww...
cookies
Set<Cookie> cookies=driver.manage().getCookies();	
	 	 for(Cookie cookie:cookies)	
{	
System.out.println(cookie.ge...
wait strategies
!55
overview
•

Locating elements on a page is already an art.

•

Locating elements on a page that don’t always appear
in a t...
Implicit waits
!

Just wait for a period to time
//Set the Implicit Wait time Out to 10 Seconds
driver.manage().timeouts()...
Explicit waits
Wait until a condition is met
WebDriverWait wait = new
WebDriverWait(driver, 10);
wait.until(ExpectedCondit...
Fluent Waits
•

!

Use the code that is best for your application under test

// Waiting 30 seconds for an element to be p...
page objects
!60
overview
•

what are page objects?

•

how to use page objects?

www.time2test.co.uk

!61

www.seleniumbootcamp.com
what are page objects?
•

popular design pattern

•

object orientated class for a page

•

interface to the web page

•

...
benefits of page objects?
•

more readable code

•

logical grouping

•

easy to maintain code

•

tests don’t change if UI...
basic example
•

http://www.whiteboxtest.com/selenium2-WebDriverPage-Object.php

www.time2test.co.uk

!64

www.seleniumboo...
cross browser and
remote
!65
overview
•

running your tests on Firefox

•

running your tests on IE

•

running your tests on Chrome

•

running remote...
RemoteWebDriver
•

WebDriver driver = new RemoteWebDriver(new
URL(“http://server-with-selenium-grid-running: 4444/wd/
hub"...
cross browser
•

different browsers behave differently

•

perform most testing on Firefox

•

some subset test execution ...
ieWebdriver

www.time2test.co.uk

!69

www.seleniumbootcamp.com
chromeWebdriver

www.time2test.co.uk

!70

www.seleniumbootcamp.com
know how
!71
Troubleshooting
•

Can’t click or find an element?

•

Selenium Versions

•

Firefox browser versions

•

Downgrade or upgr...
Simple Google Search Test

www.time2test.co.uk

!73

www.seleniumbootcamp.com
web table data

www.time2test.co.uk

!74

www.seleniumbootcamp.com
dropdown list

•

Select object and use .select notation

www.time2test.co.uk

!75

www.seleniumbootcamp.com
click

•

Find an element and then .click();

www.time2test.co.uk

!76

www.seleniumbootcamp.com
generate random data

•

create a nice random helper class for your random
test data needs

www.time2test.co.uk

!77

www....
screenshots
•

take a screenshot when you spot an error or an
exception or for validation purposes.

•

useful to save thi...
get all links on page

•

Find elements and put traverse through the List

www.time2test.co.uk

!79

www.seleniumbootcamp....
advanced - out of
scope for SB
!80
testNG
•

Support for data-driven testing
!

•

Annotations :
•
•

•
•

@BeforeMethod

•

•

@AfterClass

•

•

@BeforeCla...
data driven testing

•

Excel spreadsheets or CSV files to seed your tests

•

TestNG is good with data driven testing

www...
conclusions
!83
goals and objectives
!

•
•
•

Review your goals.
Have we met your expectations?
Email us and we will setup a follow up Sk...
Thank you for attending
- Time2test Team
!85
Upcoming SlideShare
Loading in...5
×

Selenium bootcamp slides

3,244

Published on

Selenium Bootcamp Webdriver training slides. Join our training session by signing up at www.seleniumbootcamp.com

Published in: Business, Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,244
On Slideshare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
0
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Transcript of "Selenium bootcamp slides "

  1. 1. www.time2test.co.uk presents Selenium Bootcamp Webdriver Training !1
  2. 2. Join us and Book Online ★ Book ★ One your selenium webdriver training with us day - intensive 10 hours - 8am to 6pm ★ Locations: Dublin, Berlin, Dubai, Brussels, New York, Copenhagen, Zurich ★ Learn and Apply - Practical ★ Lunch and Refreshments inclusive ★ Small classes up to 6 delegates www.time2test.co.uk !2 www.seleniumbootcamp.com
  3. 3. book online Bootcamp locations Dublin London Berlin Brussels Delhi Vancouver New York www.time2test.co.uk South Africa !3 Dubai www.seleniumbootcamp.com
  4. 4. Berlin September 2013 www.time2test.co.uk !4 www.seleniumbootcamp.com
  5. 5. Dublin November 2013 www.time2test.co.uk !5 www.seleniumbootcamp.com
  6. 6. Dubai January 2014 www.time2test.co.uk !6 www.seleniumbootcamp.com
  7. 7. Book today www.time2test.co.uk !7 www.seleniumbootcamp.com
  8. 8. Start !8
  9. 9. overview • introductions and background • 90% practical training • 10% theory and coffee www.time2test.co.uk !9 www.seleniumbootcamp.com
  10. 10. who we are? • Time2test Limited ( UK) based training company • Specialise in training for testers • Training Locations: UK and Europe • Over 15 Courses: Coding for Testers, Webdriver Automation & Mobile Test Automation www.time2test.co.uk !10 www.seleniumbootcamp.com
  11. 11. Fast paced course • We have limited time • We can follow up via Skype if necessary • Email us info@time2test.co.uk with questions www.time2test.co.uk !11 www.seleniumbootcamp.com
  12. 12. About the trainer “Hi, I am the trainer. This slide is about me and my technology background.” www.time2test.co.uk !12 www.seleniumbootcamp.com
  13. 13. Agenda • 7:45 - 8am - Introductions and Coffee • 8am - 10am - Morning session Timings are approximate • Coffee Break 1 - 15 mins • 10am-1pm - Mid Morning session • Lunch Break - 30 mins • 1pm - 3pm - Afternoon session Time to catch the plane • Coffee Break 2 - 15 mins • 3pm - 6pm - Late Afternoon session www.time2test.co.uk !13 www.seleniumbootcamp.com
  14. 14. Training Room • Fire Exits • Water • Lavatories • Breaks and lunch • Wifi connection www.time2test.co.uk !14 www.seleniumbootcamp.com
  15. 15. what we will cover? • Selenium 2 WebDriver API • Handling Alerts • Using WebDriver to navigate web applications • Working with Cookies • Basic web Element identification using id, name • Synchronisation strategies • Implicit vs Explicit Waits • Explicit waits using ExpectedConditions • Explicit waits using custom expected conditions • Refactoring to Abstraction layers, Page Object Models and Domain Objects • • • Locating web elements using CSS and XPaths Use of Chrome Developer tools and Firebug WebDriver commands to Interrogate WebElements and pages • JUnit annotations to structure test code • HamCrest commands for test assertions • Page Object Modelling Approaches • WebDriver commands for Interaction and Manipulation • Running tests on multiple browsers: Firefox, Google Chrome • Using JavaScript in your tests • Using Remote WebDriver www.time2test.co.uk !15 www.seleniumbootcamp.com
  16. 16. Pre-requisites • Java programming knowledge • jUnit knowledge • Eclipse IDE • Setup on your own machine www.time2test.co.uk !16 some experience needed www.seleniumbootcamp.com
  17. 17. What do you already know? • Spend 5 minutes on telling us what you already know about Selenium Webdriver and how you have used it. • Or , tell us about your test automation experience www.time2test.co.uk !17 www.seleniumbootcamp.com
  18. 18. Style of teaching • Follow the the examples created by the trainer and then try them out on your machine. • Help each other out. www.time2test.co.uk !18 www.seleniumbootcamp.com
  19. 19. course objectives • spend 5 mins and note down your objectives and pass them over to the trainer. • We want to meet your expectations. Feel free to add objectives at any time www.time2test.co.uk !19 www.seleniumbootcamp.com
  20. 20. Environment Setup !20
  21. 21. overview • Eclipse IDE or IntelliJ IDEA • jUnit for test automation framework • Maven for package dependencies • Firefox installed - default preferred browser for Webdriver www.time2test.co.uk !21 www.seleniumbootcamp.com
  22. 22. What is Eclipse IDE • If you don’t have previous experience then just follow the trainers’ examples • Development platform with magic www.time2test.co.uk !22 www.seleniumbootcamp.com
  23. 23. What is jUnit? • test automation framework to help organise tests with improved reports www.time2test.co.uk !23 www.seleniumbootcamp.com
  24. 24. What is Maven? • configuration tool to manage package dependencies and versions without the headache. www.time2test.co.uk !24 www.seleniumbootcamp.com
  25. 25. What is Firefox? • where have you been? • webdriver and Firefox show much love www.time2test.co.uk !25 www.seleniumbootcamp.com
  26. 26. webdriver API !26
  27. 27. overview • walkthrough of the key webdriver api • commands www.time2test.co.uk !27 www.seleniumbootcamp.com
  28. 28. API - must know Webdriver - control the browser • Webdriver driver = new FirefoxDriver(); WebElement - work with elements on the page • WebElement myElement = driver.findElement(By.id(“id”)) it’s an interface to a browser www.time2test.co.uk !28 www.seleniumbootcamp.com
  29. 29. API - must know • void get(“url”) - open the web page • void quit() - close the browser • List<WebElement> findElements(By by) - find elements (more than one element) www.time2test.co.uk !29 www.seleniumbootcamp.com
  30. 30. API - find Elements • There are many different ways to find elements • By.id(“objectId”) • By.linkText(“textUsedInTheLink”) • By.partialLinkText(“partOftextUsedInTheLink”) • By.tagName(“HTMLNodeTag”) • By.className(“cssClassOnObject”) • By.cssSelector(“cssSelectorOfElement”) • By.xpath(“//xpath/To/Element”) • By.name(“elementName”) www.time2test.co.uk We prefer to use cssSelectors !30 www.seleniumbootcamp.com
  31. 31. API - operations • void click() - click on an element • void submit() - perform a submit • String getValue() • void sendKeys(“keysToSend”) - input values • void clear() - clear the input field • String getElementName() - • String getAttriubute() - • boolean toogle() - • void Actions() - perform mouse, drag and drops and keyboard operations www.time2test.co.uk !31 www.seleniumbootcamp.com
  32. 32. API - windows and frames working with Browser Windows • driver.getWindowHandles() • driver.switchTo().window.(“window_name”) working with frames • driver.switchTo().frame.(“frame_name”) www.time2test.co.uk !32 www.seleniumbootcamp.com
  33. 33. commands map • http://www.mindmeister.com/280141421/selenium-2-webdriver-commands • mind map showing a high level view of API www.time2test.co.uk !33 www.seleniumbootcamp.com
  34. 34. locating webElements !34
  35. 35. overview • use firebug/chrome developer tools to help with locating webElements • cssSelectors • XPATHS • id • name www.time2test.co.uk !35 www.seleniumbootcamp.com
  36. 36. xpaths v cssSelectors • Try to use cssSelectors over XPATHS • your automation scripts will run faster • use XPATHs to save time • finding elements on a page is an art! www.time2test.co.uk !36 www.seleniumbootcamp.com
  37. 37. xpaths • This notation // for xpaths • follow the trainer’s examples • use a tool to help determine xpaths www.time2test.co.uk !37 www.seleniumbootcamp.com
  38. 38. xpaths - firepath • great tool to assist with xpath determination • use with firebug on firefox www.time2test.co.uk !38 www.seleniumbootcamp.com
  39. 39. css selectors • reference sheet • http://www.w3schools.com/cssref/ css_selectors.asp • Too much to learn in one day • With time, you will become a master www.time2test.co.uk !39 www.seleniumbootcamp.com
  40. 40. css selectors 2 • partial match on attribute values ^= $= *= www.time2test.co.uk input[id^=‘ctrl’] Starting with: For example, if the ID of an element is ctrl_12, this will locate and return elements with ctrl at the beginning of the ID. input[id$='_userName'] Ending with: For example, if the ID for an element is a_1_ userName, this will locate and return elements with _userName at the end of the ID. input[id*='userName'] Containing: For example, if the ID of an element is panel_ login_userName_textfield, this will use the userName part in the middle to match and locate the element. !40 www.seleniumbootcamp.com
  41. 41. css selector gadget • chrome tool extension • Search in google for “CSS Selector Tester” ! www.time2test.co.uk !41 www.seleniumbootcamp.com
  42. 42. dynamic elements Does the ID of your element dynamically change? <p id="bootcamp_dynamic_1234">This p tag has a dynamic id</p> ! xpath notation to find the p tag on the page "//p[contains(@id,'bootcamp_dynamic_')]" ! cssSelector notation to find the p tag on the page "p[id*='bootcamp_dynamic_']" www.time2test.co.uk !42 www.seleniumbootcamp.com
  43. 43. jUnit and Hamcrest !43
  44. 44. overview • what is jUnit? • what is Hamcrest? • how do we use it? www.time2test.co.uk !44 www.seleniumbootcamp.com
  45. 45. jUnit • @Before • @BeforeClass • @Test • @After • @AfterClass www.time2test.co.uk !45 www.seleniumbootcamp.com
  46. 46. jUnit • Pick up the style used in our examples and then apply them www.time2test.co.uk !46 www.seleniumbootcamp.com
  47. 47. hamcrest • Hamcrest is a framework for writing matcher objects allowing 'match' rules to be defined declaratively • introduces matchers and is more friendly to read • use instead of the junit assertions • http://edgibbs.com/junit-4-with-hamcrest/ www.time2test.co.uk !47 www.seleniumbootcamp.com
  48. 48. hamcrest usage • A good starting place is the assertThat() method that can now almost always be used in place of the traditional assertEquals(). • assertThat() can be found in org.junit.Assert, but it defines using Hamcrest matchers in the signature: static <T> void assertThat(T actual, org.hamcrest.Matcher<T> matcher) www.time2test.co.uk !48 www.seleniumbootcamp.com
  49. 49. hamcrest matchers • allOf() • instanceOf() • any() • is() • anyOf() • not() • anything() • notNullValue() • describedAs() • nullValue() • equalTo() • sameInstance() www.time2test.co.uk !49 www.seleniumbootcamp.com
  50. 50. test Structure • good style • void setUp() • void tearDown() • all tests should finish with an assertion • element locators should be defined in a separate class - think about constants www.time2test.co.uk !50 www.seleniumbootcamp.com
  51. 51. Alerts and Cookies !51
  52. 52. overview • how to handle alerts? • how to handle cookies? www.time2test.co.uk !52 www.seleniumbootcamp.com
  53. 53. alerts driver.switchTo().alert().accept(); Alert Demo http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert http://www.w3schools.com/js/tryit.asp?filename=tryjs_confirm ! www.time2test.co.uk !53 www.seleniumbootcamp.com
  54. 54. cookies Set<Cookie> cookies=driver.manage().getCookies(); for(Cookie cookie:cookies) { System.out.println(cookie.getName()+" "+cookie.getValue()); } //To find the number of cookies used by this site System.out.println("Number of cookies in this site "+cookies.size()); www.time2test.co.uk !54 www.seleniumbootcamp.com
  55. 55. wait strategies !55
  56. 56. overview • Locating elements on a page is already an art. • Locating elements on a page that don’t always appear in a timely manner is also an art. • Implicit vs Explicit Waits • Explicit waits using ExpectedConditions • Explicit waits using custom expected conditions • fluent waits www.time2test.co.uk !56 www.seleniumbootcamp.com
  57. 57. Implicit waits ! Just wait for a period to time //Set the Implicit Wait time Out to 10 Seconds driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); www.time2test.co.uk !57 www.seleniumbootcamp.com
  58. 58. Explicit waits Wait until a condition is met WebDriverWait wait = new WebDriverWait(driver, 10); wait.until(ExpectedConditions.titleContains("sele nium")); www.time2test.co.uk !58 www.seleniumbootcamp.com
  59. 59. Fluent Waits • ! Use the code that is best for your application under test // Waiting 30 seconds for an element to be present on the page, checking // for its presence once every 5 seconds. Wait<WebDriver> wait = new FluentWait<WebDriver>(driver) .withTimeout(30, SECONDS) .pollingEvery(5, SECONDS) .ignoring(NoSuchElementException.class); ! WebElement foo = wait.until(new Function<WebDriver, WebElement>() { public WebElement apply(WebDriver driver) { return driver.findElement(By.id("foo")); } }); www.time2test.co.uk !59 www.seleniumbootcamp.com
  60. 60. page objects !60
  61. 61. overview • what are page objects? • how to use page objects? www.time2test.co.uk !61 www.seleniumbootcamp.com
  62. 62. what are page objects? • popular design pattern • object orientated class for a page • interface to the web page • methods for elements • encapsulates features represented by the page www.time2test.co.uk !62 www.seleniumbootcamp.com
  63. 63. benefits of page objects? • more readable code • logical grouping • easy to maintain code • tests don’t change if UI changes - just that page object • clean separation between test code and page specific code www.time2test.co.uk !63 www.seleniumbootcamp.com
  64. 64. basic example • http://www.whiteboxtest.com/selenium2-WebDriverPage-Object.php www.time2test.co.uk !64 www.seleniumbootcamp.com
  65. 65. cross browser and remote !65
  66. 66. overview • running your tests on Firefox • running your tests on IE • running your tests on Chrome • running remotely - selenium grid www.time2test.co.uk !66 www.seleniumbootcamp.com
  67. 67. RemoteWebDriver • WebDriver driver = new RemoteWebDriver(new URL(“http://server-with-selenium-grid-running: 4444/wd/ hub"), DesiredCapabilities.firefox()); • This example assumes that Selenium Server is running on server-with-selenium-grid-running with the default port of 4444. • You can run Selenium Server on any machine • For example, I run the test code from my Mac OS X computer but I run Selenium Server on a Window XP machine. www.time2test.co.uk !67 www.seleniumbootcamp.com
  68. 68. cross browser • different browsers behave differently • perform most testing on Firefox • some subset test execution on different browsers www.time2test.co.uk !68 www.seleniumbootcamp.com
  69. 69. ieWebdriver www.time2test.co.uk !69 www.seleniumbootcamp.com
  70. 70. chromeWebdriver www.time2test.co.uk !70 www.seleniumbootcamp.com
  71. 71. know how !71
  72. 72. Troubleshooting • Can’t click or find an element? • Selenium Versions • Firefox browser versions • Downgrade or upgrade using Maven to manage the versions. www.time2test.co.uk !72 www.seleniumbootcamp.com
  73. 73. Simple Google Search Test www.time2test.co.uk !73 www.seleniumbootcamp.com
  74. 74. web table data www.time2test.co.uk !74 www.seleniumbootcamp.com
  75. 75. dropdown list • Select object and use .select notation www.time2test.co.uk !75 www.seleniumbootcamp.com
  76. 76. click • Find an element and then .click(); www.time2test.co.uk !76 www.seleniumbootcamp.com
  77. 77. generate random data • create a nice random helper class for your random test data needs www.time2test.co.uk !77 www.seleniumbootcamp.com
  78. 78. screenshots • take a screenshot when you spot an error or an exception or for validation purposes. • useful to save this artefacts as part of Jenkins CI ( continuous integration) www.time2test.co.uk !78 www.seleniumbootcamp.com
  79. 79. get all links on page • Find elements and put traverse through the List www.time2test.co.uk !79 www.seleniumbootcamp.com
  80. 80. advanced - out of scope for SB !80
  81. 81. testNG • Support for data-driven testing ! • Annotations : • • • • @BeforeMethod • • @AfterClass • • @BeforeClass @AfterMethod @BeforeSuite @AfterSuite @BeforeTest @AfterTest www.time2test.co.uk !81 www.seleniumbootcamp.com
  82. 82. data driven testing • Excel spreadsheets or CSV files to seed your tests • TestNG is good with data driven testing www.time2test.co.uk !82 www.seleniumbootcamp.com
  83. 83. conclusions !83
  84. 84. goals and objectives ! • • • Review your goals. Have we met your expectations? Email us and we will setup a follow up Skype session www.time2test.co.uk !84 www.seleniumbootcamp.com
  85. 85. Thank you for attending - Time2test Team !85

×