3f06ee1c
zengjin
修改时间工具,还有船务相关
|
1
|
package com.essa.pageObject.needDealt;
|
d688c3f8
hanlei
船务
|
2
3
|
import com.essa.framework.BasePage;
|
3f06ee1c
zengjin
修改时间工具,还有船务相关
|
4
5
6
|
import com.essa.framework.Model;
import com.essa.pageObject.HomePage;
import org.openqa.selenium.By;
|
d688c3f8
hanlei
船务
|
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
|
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
//业务员补充船务资料待办页面
public class SellerFillInfoPage extends BasePage {
public SellerFillInfoPage(WebDriver driver) {
super(driver);
}
//选择货代来源
@FindBy(xpath = "//*[text()='ESSA指定']")
WebElement AppointSet;
//选择报关
@FindBy(xpath = "//*[@id='shippingPanel1']/div[2]/div/div/label[2]")
WebElement DeclareSet;
//选择货代
@FindBy(xpath = "//*[text()='请选择货代']")
WebElement AppointCompanySet;
//选择货代
@FindBy(xpath = "//*[text()='中外运']")
WebElement AppointCompanySec;
//确定选择货代
@FindBy(xpath = "//*[text()='确定']")
WebElement CommitAppointCompanySec;
//目标港口
@FindBy(xpath = "//*[@id='shippingPanel2']/div[2]/div/div/input")
WebElement TargetPortSet;
//发货人公司
@FindBy(xpath = "//*[text()='汕头伊斯卡玩具有限公司']")
WebElement ConsignmentCompany;
//收货公司
@FindBy(xpath = "//*[@id='shippingPanel4']/div[1]/ng-form/div/div/div[1]/div/div/input")
WebElement HarvestCompany;
//收货电话
@FindBy(xpath = "//*[@id='shippingPanel4']/div[1]/ng-form/div/div/div[3]/div/div/input")
WebElement HarvestMobile;
//收货传真
@FindBy(xpath = "//*[@id='shippingPanel4']/div[1]/ng-form/div/div/div[4]/div/div/input")
WebElement HarvestFax;
//收货邮编
@FindBy(xpath = "//*[@id='shippingPanel4']/div[1]/ng-form/div/div/div[5]/div/div/input")
WebElement HarvestZipcode;
//通知方公司
@FindBy(xpath = "//*[@id='shippingPanel4']/div[2]/ng-form/div/div/div[1]/div/div/input")
WebElement SetNoticeCompany;
//通知方电话号码
@FindBy(xpath = "//*[@id='shippingPanel4']/div[2]/ng-form/div/div/div[3]/div/div/input")
WebElement SetNoticeMobile;
//通知方邮编
@FindBy(xpath = "//*[@id='shippingPanel4']/div[2]/ng-form/div/div/div[5]/div/div/input")
WebElement SetNoticeZipcode;
//通知方传真
@FindBy(xpath = "//*[@id='shippingPanel4']/div[2]/ng-form/div/div/div[4]/div/div/input")
WebElement SetNoticeFix;
//寄单公司名称
@FindBy(xpath = "//*[@id='shippingPanel5']/div[7]/div/div/div[1]/div/div/input")
WebElement MailCompanyName;
//寄单联系人名称
@FindBy(xpath = "//*[@id='shippingPanel5']/div[7]/div/div/div[2]/div/div/input")
WebElement MailConnecter;
//寄单联系人名称
@FindBy(xpath = "//*[@id='shippingPanel5']/div[7]/div/div/div[3]/div/div/input")
WebElement MailPhone;
//寄单邮编
@FindBy(xpath = "//*[@id='shippingPanel5']/div[7]/div/div/div[4]/div/div/input")
WebElement MailZipcode;
//寄单传真
@FindBy(xpath = "//*[@id='shippingPanel4']/div[2]/ng-form/div/div/div[4]/div/div/input")
WebElement MailFax;
//寄单邮编
@FindBy(xpath = "//*[text()='确认']")
WebElement SubmitBtn;
|
3f06ee1c
zengjin
修改时间工具,还有船务相关
|
101
102
103
104
105
106
107
108
109
110
111
112
113
|
//流水号
@FindBy (xpath = "//*[contains(text(),'流水号:RW')]")
WebElement serialNumber;
/**
*业务员填写船务资料
* @param
* @return
*/
public HomePage toSellerFillInfo() {
// mywait(AppointSet);
dynamicWait(By.xpath("//*[contains(text(),'待办工作')]"));
Model.setSerialNum(partialStr(serialNumber.getText(), "流水号:"));//将流水号传递出去
|
d688c3f8
hanlei
船务
|
114
115
116
|
click(AppointSet);
click(DeclareSet);
click(AppointCompanySet);
|
3f06ee1c
zengjin
修改时间工具,还有船务相关
|
117
|
forceWait(1000);
|
d688c3f8
hanlei
船务
|
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
click(AppointCompanySec);
click(CommitAppointCompanySec);
mywait(TargetPortSet);
TargetPortSet.sendKeys("TestPort");
click(ConsignmentCompany);
HarvestCompany.sendKeys("TestCompany");
HarvestMobile.sendKeys("15888889999");
HarvestFax.sendKeys("TestFax@test.com");
HarvestZipcode.sendKeys("000000");
SetNoticeCompany.sendKeys("TestNoticeCompany");
SetNoticeMobile.sendKeys("15888889999");
SetNoticeFix.sendKeys("TestNoticeFix@test.com");
SetNoticeZipcode.sendKeys("000000");
MailCompanyName.sendKeys("TestMailCompanyName");
MailConnecter.sendKeys("TestMailConnecter");
MailPhone.sendKeys("TestMailPhone");
MailZipcode.sendKeys("TestMailZipCode");
MailFax.sendKeys("TestMailFax");
click(SubmitBtn);
|
3f06ee1c
zengjin
修改时间工具,还有船务相关
|
139
140
|
dynamicLoad();
return new HomePage(driver);
|
d688c3f8
hanlei
船务
|
141
142
|
}
}
|