Tech Talk: Using Javascript to Bypass Pages, Part 6

Posted Jan 23rd, 2020

Sauce Labs open office space

In order to make strides towards atomicity in testing, it is sometimes necessary to bypass steps that would normally require extra assertions. For example, testing out the checkout functionality would require a test to include logging in, adding an item, entering payment details, and THEN checking out. However, it is achievable to skip all those steps and create an atomic test that's solely focused on testing the checkout process. This is made possible by setting an application state using Javascript. 

In his latest video in the Best Practices of Automated Testing series,  Nikolay Advolodkin, Solutions Architect, demonstrates how to use Javascript injection. Included is an activity where you will be implementing Javascript to bypass pages, creating a base page object, and extracting out all the duplication.

Stay tuned for the next video!

Don’t want to wait? Access all eight videos in this Best Practices for Automated Testing series.

Written by

Larry Ho


Automated Testing