...
|
...
|
@@ -5,10 +5,22 @@ const {FIND_VIEW_OVER_TIME, ACTION_PAUSE_TIME} = require('../../config/constant' |
|
|
|
|
|
describe(ANDROID_ORDER_CONFIRM, '下单', async(driver) => {
|
|
|
|
|
|
// 暂停
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
|
|
|
//点击首页的tab bar 分类按钮
|
|
|
let categoryTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_sort_rl', FIND_VIEW_OVER_TIME);
|
|
|
let categoryTab = await driver.waitForElementById('com.yoho:id/tabMain_radioImage_sort_rl', 10000);
|
|
|
await categoryTab.click();
|
|
|
//点击分类中的 其中一个分类
|
|
|
|
|
|
// 暂停
|
|
|
await driver.sleep(ACTION_PAUSE_TIME);
|
|
|
|
|
|
//点击分类中的第一个子分类:比如男装
|
|
|
let categorySubSortFirst = await driver.waitForElementByXPath("/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup[1]/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.LinearLayout[1]/android.widget.TextView", FIND_VIEW_OVER_TIME);
|
|
|
await categorySubSortFirst.click();
|
|
|
|
|
|
|
|
|
//点击分类中的 其中一个品类
|
|
|
let category = await driver.waitForElementByXPath("/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup[1]/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.view.ViewGroup/android.support.v7.widget.RecyclerView/android.widget.LinearLayout[1]/android.widget.GridView/android.widget.RelativeLayout[1]/android.widget.ImageView", FIND_VIEW_OVER_TIME);
|
|
|
await category.click();
|
|
|
|
...
|
...
|
@@ -27,7 +39,7 @@ describe(ANDROID_ORDER_CONFIRM, '下单', async(driver) => { |
|
|
await addToCart.click();
|
|
|
|
|
|
//选择尺码
|
|
|
let chooseSize = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.ScrollView/android.widget.LinearLayout/android.widget.LinearLayout[2]/android.view.ViewGroup/android.widget.LinearLayout[1]/android.widget.TextView', FIND_VIEW_OVER_TIME);
|
|
|
let chooseSize = await driver.waitForElementByXPath('/hierarchy/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.ScrollView/android.widget.LinearLayout/android.widget.LinearLayout[2]/android.view.ViewGroup/android.widget.LinearLayout[3]/android.widget.TextView', FIND_VIEW_OVER_TIME);
|
|
|
await chooseSize.click();
|
|
|
|
|
|
// 暂停
|
...
|
...
|
|