27d9a429
suweicheng
开发梳理;
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package com.buyer.pageObject;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import com.essa.framework.BasePage;
/**
* @author Administrator
*设置贴纸页
*/
public class SettingStickerPage extends BasePage {
public SettingStickerPage(WebDriver driver) {
super(driver);
}
//不应用贴纸
@FindBy (xpath ="//*[@title='No stickers for these products']")
WebElement noNeedSticker;
|
a3e6db11
zengjin
修改bug
|
21
22
23
24
25
|
//第一个贴纸
@FindBy (xpath = "//ul[@class='list']/li[2]")
WebElement firstSticker;
|
27d9a429
suweicheng
开发梳理;
|
26
27
28
29
30
31
32
33
34
35
36
37
38
|
//下一步
@FindBy (xpath ="//*[text()='Next step']")
WebElement next;
//弹框提示-确定
@FindBy (xpath ="//*[text()='OK']")
WebElement ok;
/**
* 设置贴纸:不应用贴纸
* @return OrderPreviewPage
*/
public OrderPreviewPage setSticker() {
|
27d9a429
suweicheng
开发梳理;
|
39
|
dynamicWait(By.xpath("//*[@title='No stickers for these products']"));
|
a3e6db11
zengjin
修改bug
|
40
41
42
|
if (isVisibility(By.xpath("//ul[@class='list']/li[2]"))){
click(firstSticker);
}
|
27d9a429
suweicheng
开发梳理;
|
43
44
45
46
47
48
|
click(noNeedSticker);
click(next);
click(ok);
return new OrderPreviewPage(driver);
}
}
|