Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Four Tips for More Testable UI
Search
Jim Holmes
March 17, 2019
Technology
0
51
Four Tips for More Testable UI
Quick talk given at the 2019 Microsoft MVP summit during the ALM group's MVP2MVP sessions.
Jim Holmes
March 17, 2019
Tweet
Share
More Decks by Jim Holmes
See All by Jim Holmes
Adapting to Change in Software Delivery
jimholmes
0
72
Public_Speaking.pdf
jimholmes
0
93
Trusted System Boundaries
jimholmes
0
91
What's Worse? Zombies or Brittle UI Tests?
jimholmes
0
110
Odd Parallels Between Weightlifting and Software Delivery
jimholmes
0
56
Is Quality The Bottleneck?
jimholmes
0
130
Don't Fear Leadership
jimholmes
0
90
Intro To TDD
jimholmes
1
78
Honor Flight #20 (Bay Area) Recap
jimholmes
0
130
Other Decks in Technology
See All in Technology
Reinforcement Fine-tuning 基礎〜実践まで
ch6noota
0
180
AIプラットフォームにおけるMLflowの利用について
lycorptech_jp
PRO
1
150
【AWS re:Invent 2025速報】AIビルダー向けアップデートをまとめて解説!
minorun365
4
520
SREには開発組織全体で向き合う
koh_naga
0
190
AWS re:Invent 2025で見たGrafana最新機能の紹介
hamadakoji
0
380
SSO方式とJumpアカウント方式の比較と設計方針
yuobayashi
7
670
RAG/Agent開発のアップデートまとめ
taka0709
0
180
学習データって増やせばいいんですか?
ftakahashi
2
330
AWS Trainium3 をちょっと身近に感じたい
bigmuramura
1
140
モダンデータスタック (MDS) の話とデータ分析が起こすビジネス変革
sutotakeshi
0
490
グレートファイアウォールを自宅に建てよう
ctes091x
0
150
非CUDAの悲哀 〜Claude Code と挑んだ image to 3D “Hunyuan3D”を EVO-X2(Ryzen AI Max+395)で動作させるチャレンジ〜
hawkymisc
2
180
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Typedesign – Prime Four
hannesfritz
42
2.9k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Side Projects
sachag
455
43k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
70k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Making Projects Easy
brettharned
120
6.5k
Transcript
Testable UIs
Or: How to help your test automation folks drink less
[email protected]
@aJimHolmes
Fortune 10 client Java 6 Enterprise-ready components HP build and
SCM tools “What’s a unit test?”
Thank you ET
Generalized Talk Ideas apply to all UI and automation tools
https://github.com/jimholmes/ Demo-Site
Two main problems in all UI testing
Finding Stuff
Async
Also SharePoint
Finding stuff == Locators
For Web, prefer: IDs CSS/JQuery-ish Name Custom Attributes
As a last resort: XPath
None
Create Good Locators
0) Own Your HTML
None
None
None
FindElement.ById(“grid”)
None
None
1) Understand your controls / frameworks
None
None
None
FindElement.ByCss( “some big stupid CSS string”)
Someone changes style
None
None
None
FindElement.ById( “update-btn”)
2) Tweak dynamic data
None
Find elements by text content. Might not be granular enough.
None
None
No useful attributes
None
None
None
ID is position-based. Data changes, IDs change.
None
We own the code!
Is there some useful data in your objects?
None
None
None
None
None
FindElement.ById( contains(“Cobb”) )
“Name” isn’t all that useful. Got contract numbers? Project IDs?
Other stuff? Find good metadata!
3) Make complex async less painful
None
SharePoint
wait until expected condition 1 wait until expected condition 2
IF SOMETHING wait until expected condition 3 IF SOMETHING ELSE wait until expected condition 4 FINALLY wait until expected condition 342
We own the code!
Create “flags” when async is complete
None
None
None
None
None
Wait until flags.div(responseType=create) exists
0) Add static IDs 1) Tweak controls 2) Use data
for locators 3) Build flags/latches for complex async
None
https://github.com/jimholmes/ Demo-Site