case_tabmain_switch.js 1.27 KB
const wd = require('wd');
const {describe} = require('../../libs/driver');
const {ANDROID_MAINTAB_SWITCH} = require('../../scene-types/scene-types');
const {FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME} = require('../../config/constant');

describe(ANDROID_MAINTAB_SWITCH,'安卓首页TAB切换', async(driver) => {
    // 首页tab
    let touchTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_home_rl',10000);
    await touchTab.click();

    // 暂停
    await driver.sleep(ACTION_PAUSE_TIME);

    // 分类tab
    touchTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_sort_rl',10000);
    await touchTab.click();

    // 暂停
    await driver.sleep(ACTION_PAUSE_TIME);

    // 社区tab
    touchTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_stroll_rl',10000);
    await touchTab.click();

    // 暂停
    await driver.sleep(ACTION_PAUSE_TIME);

    // 个人中心tab
    touchTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_my_rl',10000);
    await touchTab.click();

    // 暂停
    await driver.sleep(ACTION_PAUSE_TIME);

    // UFO
    touchTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_ufo_rl',10000);
    await touchTab.click();

    // 暂停
    await driver.sleep(10000);

});