Slide 1

Slide 1 text

Fragile Locators By Anil Kumar Krishnashetty https://unsplash.com/photos/cGXdjyP6-NU @anilbms75

Slide 2

Slide 2 text

Agenda • PageObject problems • Test attributes • Tools • Summary @anilbms75

Slide 3

Slide 3 text

https://unsplash.com/photos/iv6Xbp11olc @anilbms75

Slide 4

Slide 4 text

https://marketplace.atlassian.com/apps/1219033/assertthat-bdd-test-automation-in-jira?hosting=cloud&tab=overview

Slide 5

Slide 5 text

Photo credit: Chris Lawton

Slide 6

Slide 6 text

Templates https://unsplash.com/photos/iv6Xbp11olc https://unsplash.com/photos/0TH1H1rq_eY

Slide 7

Slide 7 text

Components https://unsplash.com/photos/iv6Xbp11olc

Slide 8

Slide 8 text

Design system from Contentful Forma36 https://unsplash.com/photos/iv6Xbp11olc

Slide 9

Slide 9 text

Only QA writing the Automation test steps https://unsplash.com/photos/iv6Xbp11olc https://unsplash.com/photos/0TH1H1rq_eY

Slide 10

Slide 10 text

Can your Product Owner / business stack holder writing test cases? https://unsplash.com/photos/iv6Xbp11olc https://unsplash.com/photos/0TH1H1rq_eY

Slide 11

Slide 11 text

https://www.amazon.de/dp/0955683610 @anilbms75 Gojko adzic

Slide 12

Slide 12 text

Can your Product Owner / business stack holder writing test cases? https://unsplash.com/photos/iv6Xbp11olc https://unsplash.com/photos/0TH1H1rq_eY

Slide 13

Slide 13 text

Solutions • AI • Multiple locators • Test attributes

Slide 14

Slide 14 text

AI selectors - testim.io demo Demp app link

Slide 15

Slide 15 text

Selenium IDE multiple locators demo Demp app link

Slide 16

Slide 16 text

PageObjects @anilbms75

Slide 17

Slide 17 text

PageObjects Locators Page paths Actions @anilbms75

Slide 18

Slide 18 text

class WdioPage extends Page { // Locators get search() { return $('#search_input_react') } get helpLink() { return $('header > div > nav > ul > li:nth-child(3) > a') } } @anilbms75

Slide 19

Slide 19 text

class WdioPage extends Page { // page path get gettingStartedPagePath(){return 'docs/gettingstarted.html'} } @anilbms75

Slide 20

Slide 20 text

class WdioPage extends Page { // Actions async open(pagePath) { super.open(pagePath) } async navigateToHelp() { const helpLink = await this.helpLink; // actions await helpLink.click(); } } @anilbms75

Slide 21

Slide 21 text

class WdioPage extends Page { // Locators get search() { return $('#search_input_react') } get helpLink() { return $('header > div > nav > ul > li:nth-child(3) > a') } // page path get gettingStartedPagePath(){return 'docs/gettingstarted.html'} // Actions async open(pagePath) { super.open(pagePath) } async navigateToHelp() { const helpLink = await this.helpLink; // actions await helpLink.click(); } } @anilbms75

Slide 22

Slide 22 text

WebdriverIO PageObjects demo @anilbms75

Slide 23

Slide 23 text

Test attributes

Slide 24

Slide 24 text

@anilbms75 DEV TEST SHARED

Slide 25

Slide 25 text

Product Owner Developer QA PageObject E2E Test Web app on Browser Server

Slide 26

Slide 26 text

Tightly coupled PageObject E2E Test Web app on Browser Server

Slide 27

Slide 27 text

Loosely coupled PageObject E2E Test Web app on Browser Server

Slide 28

Slide 28 text

Development responsibility PageObject E2E Test Web app on Browser Server Locators PagePaths

Slide 29

Slide 29 text

QA responsibility PageObject E2E Test Web app on Browser Server Locators PagePaths

Slide 30

Slide 30 text

Independant PageObject E2E Test

Slide 31

Slide 31 text

Mixed responsibility PageObject E2E Test Web app on Browser Server Locators PagePaths

Slide 32

Slide 32 text

SUT https://unsplash.com/photos/iv6Xbp11olc Stop using Page Objects and Start using App Actions Chrome DevTools as Automation Protocol

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Do you have any questions to me? ?

Slide 35

Slide 35 text

Contact https://unsplash.com/photos/iv6Xbp11olc Anil Kumar Krishnashetty Twitter: @anilbms75 Email: [email protected] LinkedIn: https://www.linkedin.com/in/anilk4/