测试用例如下:
describe('pages/default/launch/launch.vue', () => {
let page;
beforeAll(async () => {
page = await program.reLaunch('/pages/default/launch/launch')
await page.waitFor(3000);
});
it('check page title', async () => {
const el = await page.$('.table-text-container-text');
el.tap();
await page.waitFor(5000);
// 进入目的地页面
const page1 = await program.currentPage();
const path1=page1.path
expect(path1).toEqual('pages/toolPage/page/city/city');
let el0=await page1.$('scroll-view');
console.log(111+await el0);
let el1=await el0.$('.city-input');
console.log(222+await el1);
el1.tap();
await el1.input("直连测试酒店(请勿购买)");
await page1.waitFor(2000);
let el2=await el0.$('.search-list-mt45');
console.log(333+await el2);
await page1.waitFor(2000);
el2.tap();
let el3=el2.$('.search-list-item-box');
console.log(444+await el3);
let el4=el3.$('.search-list-hotel-item');
console.log(555+await el4);
await page1.waitFor(2000);
el4.tap();
});
});
0 个回复