27d9a429
suweicheng
开发梳理;
|
1
2
|
package com.essa.pageObject.PODocumentary;
|
d3c5a77a
zengjin
idea第一次提交
|
3
4
|
import com.essa.framework.Model;
import org.openqa.selenium.By;
|
27d9a429
suweicheng
开发梳理;
|
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import com.essa.framework.BasePage;
/**
* @author Administrator
*PO跟单任务列表页面
*/
public class PODocumentaryListPage extends BasePage {
public PODocumentaryListPage(WebDriver driver) {
super(driver);
}
/*
* 元素定位
*/
@FindBy (xpath = "//*[contains(text(),'高级查询')]")
WebElement advancedQuery;//高级查询
|
d3c5a77a
zengjin
idea第一次提交
|
26
27
28
29
30
31
32
33
34
35
|
@FindBy (xpath = "//*[text()='PO单号:']/../div[1]/input")
WebElement OrderNo;//PO单号
@FindBy (xpath = "//*[text()='查询']")
WebElement search;//查询按钮
@FindBy (xpath = "//*[@id='listView']/div/table/tbody/tr[1]/td/div/div[1]/div/ul/li[1]/a")
WebElement detail;//搜索结果中的一个查看详情
|
a0824d2d
toby5221
啊啊啊
|
36
37
38
39
40
41
42
43
44
45
46
47
|
// 关键字查询
@FindBy (xpath = "//*[contains(@placeholder,'请输入PO单号、客户编号等关键字查询')]")
WebElement keySearch;
// 放大镜查询按钮
@FindBy (xpath = "//*[contains(@ng-click,'search()')]")
WebElement magnifierSearch;
// 查看详情
@FindBy (xpath = "//*[contains(text(),'查看详情')]")
WebElement followDetail;
|
d3c5a77a
zengjin
idea第一次提交
|
48
49
50
51
52
53
54
55
56
57
58
59
|
/*
* 页面方法
*/
public POBoardPage todetail() {
mywait(detail);
click(advancedQuery);
sendKeys(OrderNo, Model.getPoNum());
click(search);
dynamicLoad(By.xpath("//*[style='display: block;']"));
click(detail);
return new POBoardPage(driver);
}
|
a0824d2d
toby5221
啊啊啊
|
60
61
62
63
64
65
66
67
|
/**
* 进入PO跟单详情
* @return
*/
public PODocumentaryListPage toPoFollowDetail(){
sendKeys(keySearch, Model.getPoNum());
click(magnifierSearch);
|
438eca07
toby5221
添加断言
|
68
|
forceWait(8000);
|
a0824d2d
toby5221
啊啊啊
|
69
70
|
dynamicWait(By.xpath("//div[@class='row xxrow-header-bg row-border-bottom no-margin padding-horizontal-5']"));
click(followDetail);
|
438eca07
toby5221
添加断言
|
71
|
forceWait(8000);
|
a0824d2d
toby5221
啊啊啊
|
72
73
74
|
dynamicWait(By.xpath("//div[@class='panel-body']"));
return new PODocumentaryListPage(driver);
}
|
27d9a429
suweicheng
开发梳理;
|
75
|
}
|