Authored by 孟顺

商品详情js修改

... ... @@ -15,7 +15,7 @@ describe(IOS_PRODUCT_DETAIL, '商品详情页埋点测试', async(driver) => {
await firstProduct.click();
console.log("点击其中一个商品完成");
//进入购物车
let goToShopCart = await driver.waitForElementByAccessibilityId('indicator shoppingbag', 3000);
let goToShopCart = await driver.waitForElementByAccessibilityId('yh_prd_detail_shopcart_btn', 3000);
await goToShopCart.click();
console.log("进入购物车完成");
//返回商品详情
... ... @@ -23,13 +23,19 @@ describe(IOS_PRODUCT_DETAIL, '商品详情页埋点测试', async(driver) => {
await backPrdDetail.click();
console.log("返回详情完成");
//点击分享
let tapShare = await driver.waitForElementByAccessibilityId('yh prd share icon', 3000);
let tapShare = await driver.waitForElementByAccessibilityId('shareActionBtn', 3000);
await tapShare.click();
console.log("点击分享完成");
//取消分享
let cancelShare = await driver.waitForElementByAccessibilityId('取消', 3000);
await cancelShare.click();
console.log("取消完成");
let tapMore = await driver.waitForElementByAccessibilityId('moreActionBtn', 3000);
await tapMore.click();
console.log("点击更多");
let cancelMore = await driver.waitForElementByAccessibilityId('quick_jump_bg_view', 3000);
await cancelMore.click();
console.log("取消更多");
//点击加入购物车
let addToCart = await driver.waitForElementByAccessibilityId('加入购物车', 3000);
await addToCart.click();
... ... @@ -43,11 +49,11 @@ describe(IOS_PRODUCT_DETAIL, '商品详情页埋点测试', async(driver) => {
await chooseSize.click();
console.log("完成选择尺码");
//加一下
let chooseAdd = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeTable/XCUIElementTypeCell[3]/XCUIElementTypeButton[1]', 3000);
let chooseAdd = await driver.waitForElementByAccessibilityId('yh_choose_view_add_btn', 3000);
await chooseAdd.click();
console.log("点击加一件");
//减一下
let chooseReduce = await driver.waitForElementByXPath('//XCUIElementTypeApplication[@name="Yoho!Buy有货"]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[2]/XCUIElementTypeOther/XCUIElementTypeTable/XCUIElementTypeCell[3]/XCUIElementTypeButton[2]', 3000);
let chooseReduce = await driver.waitForElementByAccessibilityId('yh_choose_view_reduce_btn', 3000);
await chooseReduce.click();
console.log("点击减一件");
//点击加入购物车
... ...