27d9a429
suweicheng
开发梳理;
|
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
package com.essa.pageObject.needDealt;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import com.essa.framework.BasePage;
import com.essa.framework.Model;
import com.essa.pageObject.HomePage;
/**
* 当团购活动成功时,类目经理采购计划单申请页面
* @author Administrator
*
*/
public class NeedDealtApplyPage extends BasePage {
public NeedDealtApplyPage(WebDriver driver) {
super(driver);
}
/*
* 元素定位
*/
//提交询价
@FindBy (xpath ="//*[text()='提交询价']")
WebElement submitInquiry;
//待办工作--检查点
@FindBy (xpath = "//*[contains(text(),'待办工作')]")
WebElement checkpoint;
//流水号
@FindBy (xpath = "//*[contains(text(),'流水号:RW')]")
WebElement serialNumber;
//确认
@FindBy (xpath = "//*[text()='确认']")
WebElement confirm;
//送审核
@FindBy (xpath = "//*[text()='提交审核']")
WebElement toAudit;
//认领
@FindBy (xpath = "//*[text()='认领']")
WebElement claim;
//同意
@FindBy (xpath ="//*[text()='同意']")
WebElement agree;
//添加
@FindBy(xpath = "//*[text()='添加']" )
WebElement add;
//船公司
@FindBy(xpath = "//input[@name='shipperCompany']")
WebElement inputShipperCompany;
//开船日期
@FindBy(xpath = "//input[@id='deliveryDate0']")
WebElement inputShipperStartDate;
//预计到港日期
@FindBy(xpath = "//input[@id='estimatedArrivalDate0']")
WebElement inputShipperArriveDate;
//提交
@FindBy(xpath = "//*[text()='提交']")
WebElement submit;
//暂存
@FindBy(xpath = "//*[text()='暂存']")
WebElement save;
/*
* 页面方法
*/
/**
* 提交询价
* @return bmps首页
*/
public HomePage submitInquiry() {
mywait(checkpoint);
forceWait(1000);
Model.setSerialNum(partialStr(serialNumber.getText(), "流水号:"));
moveHeightScroll("100");
click(submitInquiry);
forceWait(500);
click(confirm);
dynamicLoad(By.xpath("//*[style='display: block;']"));
return new HomePage(driver);
}
/**
* 类目经理修订,送审核
* @return bpms首页
*/
public HomePage toAudit() {
mywait(checkpoint);
forceWait(1000);
moveHeightScroll("100");
click(toAudit);
forceWait(500);
click(confirm);
dynamicLoad(By.xpath("//*[style='display: block;']"));
return new HomePage(driver);
}
/**
* 财务审核计划申请
* @return
*/
public HomePage audit() {
mywait(checkpoint);
forceWait(1000);
moveHeightScroll("100");
click(claim);
mywait(checkpoint);
moveHeightScroll("100");
click(agree);
click(confirm);
dynamicLoad(By.xpath("//*[style='display: block;']"));
return new HomePage(driver);
}
public HomePage confirmSailingDate() {
mywait(checkpoint);
forceWait(1000);
Model.setSerialNum(partialStr(serialNumber.getText(), "流水号:"));
click(confirm);
return new HomePage(driver);
}
/**
* 认领船务登记船期待办
* @return 首页
*/
public HomePage toClaimShippingMark(){
|
d7f15c1c
zengjin
提交并且覆盖之前的
|
147
148
|
dynamicWait(By.xpath("//*[contains(text(),'待办工作')]"));
Model.setSerialNum(partialStr(serialNumber.getText(), "流水号:"));
|
27d9a429
suweicheng
开发梳理;
|
149
|
if(isVisibility(By.xpath("//*[text()='认领']"))){
|
d7f15c1c
zengjin
提交并且覆盖之前的
|
150
|
moveHeightScroll("0");
|
27d9a429
suweicheng
开发梳理;
|
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
click(claim);
}
forceWait(3000);
mywait(checkpoint);
click(add);
sendKeys(inputShipperCompany,"essa");
//设置开船日期
jsExecutorRemoveAttribute(inputShipperStartDate,"readonly");
inputShipperStartDate.clear();
sendKeys(inputShipperStartDate,"10/25/2018");
//设置预计到港日期
jsExecutorRemoveAttribute(inputShipperArriveDate,"readonly");
inputShipperArriveDate.clear();
sendKeys(inputShipperArriveDate,"11/10/2018");
//提交
click(submit);
|
d7f15c1c
zengjin
提交并且覆盖之前的
|
167
|
dynamicLoad();
|
27d9a429
suweicheng
开发梳理;
|
168
169
170
171
172
|
return new HomePage(driver);
}
}
|