tab_guang.js 1.07 KB
const wd = require('wd');
const {describe} = require('../../libs/driver');
const {iOS_TAB_GUANG} = require('../../scene-types/scene-types');

describe(iOS_TAB_GUANG,'逛(有货社区)', async(driver) => {
    //点击首页的tab bar 社区按钮
    let tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[4]', 10000);
    await tapView.click();

    tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeCollectionView/XCUIElementTypeCell[3]', 3000);
    await tapView.click();

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