...
|
...
|
@@ -5,38 +5,71 @@ const { FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME } = require('../../config/constan |
|
|
|
|
|
describe(iOS_TAB_CATEGORY,'分类(品类&品牌)', async(driver) => {
|
|
|
//点击首页的tab bar 分类按钮
|
|
|
let tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[2]', 10000);
|
|
|
let tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeTabBar/XCUIElementTypeButton[2]', FIND_VIEW_OVER_TIME);
|
|
|
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[1]/XCUIElementTypeOther[2]/XCUIElementTypeTable/XCUIElementTypeCell[2]', 3000);
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('YH_LeftCategoryView_1', FIND_VIEW_OVER_TIME);
|
|
|
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[1]/XCUIElementTypeOther[2]/XCUIElementTypeTable/XCUIElementTypeCell[3]', 3000);
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('YH_LeftCategoryView_2', FIND_VIEW_OVER_TIME);
|
|
|
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[1]/XCUIElementTypeOther[2]/XCUIElementTypeTable/XCUIElementTypeCell[4]', 3000);
|
|
|
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[1]/XCUIElementTypeOther[1]/XCUIElementTypeCollectionView/XCUIElementTypeCell[2]', 3000);
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('YH_LeftCategoryView_3', FIND_VIEW_OVER_TIME);
|
|
|
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[1]/XCUIElementTypeOther[1]/XCUIElementTypeCollectionView/XCUIElementTypeCell[3]', 3000);
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_2', FIND_VIEW_OVER_TIME);
|
|
|
await tapView.click();
|
|
|
//选择 女装点击
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_1', FIND_VIEW_OVER_TIME);
|
|
|
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[1]/XCUIElementTypeOther[1]/XCUIElementTypeCollectionView/XCUIElementTypeCell[4]', 3000);
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_3', FIND_VIEW_OVER_TIME);
|
|
|
await tapView.click();
|
|
|
//选择 高街BLK点击
|
|
|
tapView = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeCollectionView/XCUIElementTypeCell[5]', 3000);
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_4', FIND_VIEW_OVER_TIME);
|
|
|
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[1]/XCUIElementTypeOther[1]/XCUIElementTypeCollectionView/XCUIElementTypeCell[1]', 3000);
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_0', FIND_VIEW_OVER_TIME);
|
|
|
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[1]/XCUIElementTypeOther[3]/XCUIElementTypeCollectionView/XCUIElementTypeCell[4]/XCUIElementTypeOther', 3000);
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_categoryCell_1', FIND_VIEW_OVER_TIME);
|
|
|
await tapView.click();
|
|
|
console.log("回到品类首页");
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_base_vc_back_btn', FIND_VIEW_OVER_TIME);
|
|
|
tapView.click();
|
|
|
console.log("点击品牌");
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_brand_nav_btn', FIND_VIEW_OVER_TIME);
|
|
|
tapView.click();
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_2', FIND_VIEW_OVER_TIME);
|
|
|
tapView.click();
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_4', FIND_VIEW_OVER_TIME);
|
|
|
tapView.click();
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_3', FIND_VIEW_OVER_TIME);
|
|
|
tapView.click();
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_1', FIND_VIEW_OVER_TIME);
|
|
|
tapView.click();
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_SlideSegmentControl_0', FIND_VIEW_OVER_TIME);
|
|
|
tapView.click();
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
tapView = await driver.waitForElementByAccessibilityId('yh_category_nav_btn', FIND_VIEW_OVER_TIME);
|
|
|
tapView.click();
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|