Test Automation Stack

,

Cypress: Executing Python scripts

There might be cases where we need to call python scripts within our cypress test workflow.

In node.js world we can do this using the child_process but with Cypress we can just use cy.exec command to execute any system command.

cy.exec(“python3 <filePath>”) > this will execute the command, and the executed command result can be collected using then() chaining command.

Below is the example

Leave a comment

I’m Gurudatt

Profile Pic

With over 12 years of quality assurance experience, i have used various test automation tools and testing concepts and helped organization and teams to speed up testing process effectively. I’m also a Cypress.io Ambassador and BrowserStack Champion.

Let’s connect

Discover more from Test Automation Stack

Subscribe now to keep reading and get access to the full archive.

Continue reading