POBoardPage.java
1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package com.essa.pageObject.PODocumentary;
import com.essa.framework.Model;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import com.essa.framework.BasePage;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
public class POBoardPage extends BasePage {
public POBoardPage(WebDriver driver) {
super(driver);
}
/*
* 元素定位
*/
@FindBy (xpath = "//*[text()='订单任务看板']")
WebElement taskBoard;//订单任务看板
@FindBy (xpath = "//*[@ng-model='keyword']")
WebElement keyword;//关键字查询输入框
@FindBy (xpath ="//*[@ng-model='keyword']/../span/button")
WebElement search;//查询按钮
@FindBy (xpath = "//*[@id='detailView']/div/div[3]/div[1]/div/div/table/tbody/tr[1]/td/div[2]/div[1]/input")
WebElement firstCheckbox;//第一个复选框
@FindBy (xpath ="//button[contains(text(),'转在途尾货')]")
WebElement toTail;//转在途尾货按钮
@FindBy (xpath = "//button[contains(text(),'通知收货')]")
WebElement noticeReceive;//通知收货按钮
@FindBy(xpath ="//button[contains(text(),'通知装柜')]")
WebElement noticeLoad;//通知装柜按钮
/*
* 页面方法
*/
/**
* 转在途尾货
* @return 转在途尾货页面
*/
public ConvertTailPage toTail() {
dynamicLoad(By.xpath("//*[style='display: block;']"));//等待页面加载完成
click(taskBoard);
dynamicLoad(By.xpath("//*[style='display: block;']"));
sendKeys(keyword, Model.getSkuNo());
click(search);
dynamicLoad(By.xpath("//*[style='display: block;']"));
click(firstCheckbox);
click(toTail);
return new ConvertTailPage(driver);
}
}