Back to browse
Write WEB UI Auto Test with Cypress
Use Page Object Pattern to write UI auto script with wdio framework,Javscript ES5 for the web "https://angular.realworld.io" let it run on the ios simulator us…
Added May 19, 20260 views0 copies
Prompt
Use Page Object Pattern to write UI auto script with wdio framework,Javscript ES5 for the web "https://angular.realworld.io"
let it run on the ios simulator
use let not var
create user.json file to save username "qiaotl@163.com" and password "123456"
like this code let LoginPage = {
async goToSign() {
await $('input[type="email"]').setValue(username)
}
}
module.exports=LoginPage
create newArticalPage.js
create setttingPage.js
create loginPage.js
create shouldPublishArticleSuccessfully.cy.js,use "()=>"
test step is
1.Open the "https://angular.realworld.io" website
2.click sign in menu
3.input username and password which read from user.json file
4.click sign in button
5.go to New Article page
6.publish Article
7.go to Setting page
8.logoutReplace text in [BRACKETS] with your own values before pasting.