236: Sleeping Is Not Your Best Friend in Automation with Michelle Macdonald
with Michelle Macdonald
Selenium and Appium Test Automation Engineer (Senior Developer) at Pronto Software Limited
About this episode
Have you ever watched SpongeBob SquarePants? If so, this episode is for you as we Test Talk with Michelle Macdonald about the SpongeBob-themed talk she gave at last year’s SeleniumConf titled “Sleeping is not your best friend in automation.” Discover why “sleeping” is not optimal, and learn better ways of using waits in Selenium. Are you ready? If so, listen up!
Quotes & Insights from this Test Talk with Michelle Macdonald
- So what we did was we built some sort of overall general page objects and methods to sort of interact with anything and everything in our ERP. So we don't have tests that cover everything because that would mean we'd have an infinite number of tests. First of all, I had to build a test to make sure that all the functionality was intact. In the browser that all the data tables were navigatable, all the buttons could be clicked. All those sorts of things, dialogue's and pop up to work as an expected. That was it was pretty easy actually. And we just decided to make sure that we had explicit waits used all throughout our test suite.
- I set up a framework in that allowed them to rather than write a fully fledged selenium command I would create little routines and methods that allowed them to do things like click buttons and closed dialogues and write to input fields. So the scripts that they actually write are a little bit more simplified.
- The first thing I did was I bought a book. We went to New York for a holiday in July and I thought I'm going to buy a book about giving presentations and read it on the plane. And I did it and it was a great book. And it just really helped me sort of to think about the talk it's not about me it's about the audience and I don't want to alienate the audience by saying you should do this and that it should be more conversational.
- In any particular language you can actually put in a pause, a delay or a fixed time out in your script so that it doesn't do anything say for a period of time you can specify the time say five seconds one second one hour if you want and it will just put the script to play and pause or activity until that time is over. It's a little bit dangerous because it could be that that time could vary obviously for that page to load.
- So talk had a bit of a sponge bob square pants sayings because I'm a little bit childish and I also wanted to entertain a little bit because I've been to some conferences and the talks are sometimes pretty dry. I wanted to have a bit of a theme and because I had an afternoon talk I want the bright colors to keep everyone away. So I thought What's one way of talking about sleep's that's a little bit more interesting less dry and I thought I can create my own episodes called mishmash sleep rants. Instead of sponge bob square pants. And I just thought I'd talk about four examples of where I found it hard to not use sleeps.
Keep listening
Related episodes

Automation Testing Podcast · Ep. 609
Why Your AI Tests Pass When Your Features Fail with Donovan Brady
with Donovan Brady
Why Your AI Tests Pass When Your Features Fail? Donovan Brady of Leapwork shows how to make
Oct 27

Automation Testing Podcast · Ep. 608
Scary Test Automation POCs Made Easy: Halloween Special With Paul Grossman
with Paul Grossman
Running a proof of concept on test automation tools can feel like a horror movie. Vendors promise
Oct 20

Automation Testing Podcast · Ep. 607
Locust and Azure Load Testing: Create and Debug Load Tests with AI with Lars Holmberg and Abhinav Premsekhar
with Lars Holmberg and Abhinav Premsekhar
Performance testing has never been easier to start, or more important to get right. As teams ship
Oct 6

Automation Testing Podcast · Ep. 606
AI Agents Passed the Tests. Real Devices Didn’t. with Nick Metcalfe
with Nick Metcalfe
Cloud device farms make it easy to get started with real device testing. But what happens when
Sep 29