2. Testim.io
CEO
Applitools
Director of R&D
Wix
Web Architect
Cadence
Compiler Engineer
IBM
Cloud Engineer
Google Developer Expert
Oren
Rubin
oren@testim.io
Mentor
Google Launchpad
External Lecturer
Technion University
Meetup Co-organizer
Selenium-IL, GDG, Ember
...
3. Assertions types: Functional, UI, Timing, Memory....
Test
Steps
Setup
Assertions
Stimuli
Setup types: Unit, Integration, or End-To-End
7. ● Query Languages (Intro)
● Choosing properties
● The Page Objects Solution
○ Locators
○ Web Element
● Why Record/Playback sucks
● The Testim Way
Soon
9. HTML 101
HTML Elements
● Tag - must
● Properties
● Inner Elements
<body>
<article>
<my-gallery class=gallery>
<img class="im f1" title=1> <img class="im f2" title=2>
15. XPath Advantages
Parent Selector: //img/../my-gallery
Text Selector: xxx/text()='some-text'
In CSS4: $img > xxx
<body>
<article>
<my-gallery class=gallery>
<img class="im f1" title=1> <img class="im f2" title=2>
<xxx>
CSS
vs.
XPath
16. CSS
vs.
XPath
CSS Advantages
● Web devs know CSS
● Get shortcuts for web
● CSS is a bit faster
<body>
<article>
<my-gallery class=gallery>
<img class="im f1" title=1> <img class="im f2" title=2>
22. Failure #1
Tips!
● Lookup came up empty
● No code change in this project
● No code change in other projects
● Just ran it again
Locate
by
ID Property
26. Failure #3
Tips!
● Didn't find it using jQuery
i.e. $("#my-id") === []
● No code change in this project
● New version in parent project
Locate
by
ID Property
28. Failure #4
Tips!
● Found another element instead
i.e. $("#my-id") === [<other-element>]
● No code change in this project
● No code change in other projects
Locate
by
ID Property
30. Failure #5
Tips!
● Works 50% of test runs
● See it, but $("#my-id") finds nothing
● No code change in this project
● No code change in other projects
● No timing issues
Locate
by
ID Property
50. Best Practices
● Non reusable e.g. headers/footers
○ Use Id
● Components
○ Use classes or self debugging symbols
○ Split between
■ Locating the component
■ Locating components’ parts
Page Object Design Pattern =>
Link to my Page Object presentation at SeConf 2014
Locate
by
Object Properties