I want to write end-to-end testcases for web ui, is there any way to generate cypress test cases in python from yml documentation?
For example, I have a test step written in yml
methods:
ssoLogin:
desc: sso login
steps:
- webInput(id,login-username, ytx)
- webClick(id,btn-login-nopwd)
And the expected spec.js
file might be
describe('Test scope 1', () => {
it('ssoLogin', () => {
cy.visit("xxx.com/sson/login?client_");
cy.get('#login-username').should('be.visible').clear().type('ytx', { delay: 100 });
cy.get('#btn-login-nopwd').should('be.visible').click();
cy.wait(1000 * 5)
});
});
Is there any way to write functions in JavaScript with the Cypress framework and pass arguments to them, then tidy test steps, in Python?
New contributor
叶甜心 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.