Back to Resources

Blog

Posted January 23, 2020

Tech Talk: Using Javascript to Bypass Pages, Part 6

quote

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.

Published:
Jan 23, 2020
Share this post
Copy Share Link
© 2023 Sauce Labs Inc., all rights reserved. SAUCE and SAUCE LABS are registered trademarks owned by Sauce Labs Inc. in the United States, EU, and may be registered in other jurisdictions.