Modern Web Testing with TestCafe by Dmytro Shpakovskyi
Author:Dmytro Shpakovskyi
Language: eng
Format: epub
Publisher: Packt Publishing Pvt Ltd
Published: 2020-09-25T00:00:00+00:00
Figure 4.2 â Shell output after the test run with the error
As you can see, TestCafe outputs the error and the line of code where it occurred.
But how do you debug the test even before it failed? For that purpose, TestCafe has the t.debug method. Let's add it to our test:
const { Selector } = require('testcafe');fixture('My first set of tests') .page('http://demo.redmine.org/');test('My first test', async (t) => { await t.debug().click('.login-wrong');});
This method is used to pause the test execution and debug it with the browser's developer tools. You will see some buttons to navigate the test run flow in the footer of the browser window:
Unlock Page: Allows us to interact with the browser page that is currently open.
Resume: Allows us to continue the test run.
Next Action: Executes the next action or assertion:
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7808)
Grails in Action by Glen Smith Peter Ledbrook(7719)
Azure Containers Explained by Wesley Haakman & Richard Hooper(6810)
Configuring Windows Server Hybrid Advanced Services Exam Ref AZ-801 by Chris Gill(6807)
Running Windows Containers on AWS by Marcio Morales(6326)
Kotlin in Action by Dmitry Jemerov(5089)
Microsoft 365 Identity and Services Exam Guide MS-100 by Aaron Guilmette(5053)
Combating Crime on the Dark Web by Nearchos Nearchou(4626)
Microsoft Cybersecurity Architect Exam Ref SC-100 by Dwayne Natwick(4578)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4437)
The Ruby Workshop by Akshat Paul Peter Philips Dániel Szabó and Cheyne Wallace(4316)
The Age of Surveillance Capitalism by Shoshana Zuboff(3977)
Python for Security and Networking - Third Edition by José Manuel Ortega(3877)
The Ultimate Docker Container Book by Schenker Gabriel N.;(3536)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3528)
Learn Wireshark by Lisa Bock(3495)
Mastering Python for Networking and Security by José Manuel Ortega(3376)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3353)
Blockchain Basics by Daniel Drescher(3322)
