I want to write end-to-end testcases for web ui, but is there any way to generate cypress testcases with python from yml documentation to cypress testcases? For example, I have a test step wrote in yml file
methods:
ssoLogin:
desc: sso login
steps:
- webInput(id,login-username, ytx)
- webClick(id,btn-login-nopwd)
And the expected spec.js
file maybe
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)
});
});
In a word, is there any way to write personal functions in JavaScript with cypress framework and pass arguments to them then tidy test steps in Python? The expects maybe as above.
New contributor
叶甜心 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.