tab_home.js 1.92 KB
const wd = require('wd');
const {describe} = require('../../libs/driver');
const {iOS_TAB_HOME} = require('../../scene-types/scene-types');

describe(iOS_TAB_HOME,'首页', async(driver) => {
    // let touchTab = await driver.waitForElementByAccessibilityId('home drawer entrance',10000);
    // await touchTab.click();
    // await new Promise(r => {
    //     setTimeout(() => {
    //         r()
    //     }, 2000);
    // })
    // await (new wd.TouchAction(driver))
    // .press({x: 300, y: 158})
    // .moveTo({x: 191, y: 162})
    // .release()
    // .perform()

    // touchTab = await driver.waitForElementByAccessibilityId('homeSearch',5000);
    // await touchTab.click();

    // touchTab = await driver.waitForElementByAccessibilityId('home message center',10000);
    // await touchTab.click();

    // touchTab = await driver.waitForElementByAccessibilityId('qr home',10000);
    // await touchTab.click();

    let touchTab = await driver.waitForElementByAccessibilityId('球鞋',5000);
    await touchTab.click();

    touchTab = await driver.waitForElementByAccessibilityId('男装', 5000);
    await touchTab.click();

    touchTab = await driver.waitForElementByAccessibilityId('女装',5000);
    await touchTab.click();

    touchTab = await driver.waitForElementByAccessibilityId('生活方式',5000);
    await touchTab.click();

    touchTab = await driver.waitForElementByAccessibilityId('高街BLK', 1000);
    await touchTab.click();

    touchTab = await driver.waitForElementByAccessibilityId('潮童',5000);
    await touchTab.click();

    touchTab = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[1]',5000);
    await touchTab.click();



    await new Promise(r => {
        setTimeout(() => {
            r()
        }, 5000);
    })


});