Commit d688c3f83e16cb058882ee9b0c64ed92a2ed0fd3
1 parent
d7f15c1c
船务
Showing
8 changed files
with
495 additions
and
0 deletions
Show diff stats
src/main/java/com/essa/pageObject/HomePage.java
| @@ -4,6 +4,7 @@ import com.essa.pageObject.DocumentaryManage.BillingCenterPage; | @@ -4,6 +4,7 @@ import com.essa.pageObject.DocumentaryManage.BillingCenterPage; | ||
| 4 | import com.essa.pageObject.DocumentaryManage.POBoardPage; | 4 | import com.essa.pageObject.DocumentaryManage.POBoardPage; |
| 5 | import com.essa.pageObject.DocumentaryManage.ReceiptCorePage; | 5 | import com.essa.pageObject.DocumentaryManage.ReceiptCorePage; |
| 6 | import com.essa.pageObject.GoodsManage.*; | 6 | import com.essa.pageObject.GoodsManage.*; |
| 7 | +import com.essa.pageObject.LogisticShipp.LogisticsShippPage; | ||
| 7 | import org.openqa.selenium.By; | 8 | import org.openqa.selenium.By; |
| 8 | import com.essa.pageObject.SupplierManage.SupplierOperationsTrackPage; | 9 | import com.essa.pageObject.SupplierManage.SupplierOperationsTrackPage; |
| 9 | import com.essa.pageObject.productDev.AddMatterialPage; | 10 | import com.essa.pageObject.productDev.AddMatterialPage; |
| @@ -194,6 +195,15 @@ public class HomePage extends BasePage{ | @@ -194,6 +195,15 @@ public class HomePage extends BasePage{ | ||
| 194 | WebElement billingCenter; | 195 | WebElement billingCenter; |
| 195 | 196 | ||
| 196 | 197 | ||
| 198 | + //物流船务 | ||
| 199 | + @FindBy (xpath = "//*[text()='物流船务']") | ||
| 200 | + WebElement LogisticsskippBoard; | ||
| 201 | + | ||
| 202 | + //船务看板 | ||
| 203 | + @FindBy (xpath = "//*[@id='essa-left-menu']/div/dl[1]/dd[2]") | ||
| 204 | + WebElement skippBoard; | ||
| 205 | + | ||
| 206 | + | ||
| 197 | /* | 207 | /* |
| 198 | * 方法 | 208 | * 方法 |
| 199 | */ | 209 | */ |
| @@ -526,4 +536,16 @@ public class HomePage extends BasePage{ | @@ -526,4 +536,16 @@ public class HomePage extends BasePage{ | ||
| 526 | click(billingCenter); | 536 | click(billingCenter); |
| 527 | return new BillingCenterPage(driver); | 537 | return new BillingCenterPage(driver); |
| 528 | } | 538 | } |
| 539 | + | ||
| 540 | + /** | ||
| 541 | + *进入船务看板界面 | ||
| 542 | + */ | ||
| 543 | + public LogisticsShippPage toLogisticsShippPage(){ | ||
| 544 | + mywait(LogisticsskippBoard); | ||
| 545 | + click(LogisticsskippBoard); | ||
| 546 | + mywait(skippBoard); | ||
| 547 | + click(skippBoard); | ||
| 548 | + return new LogisticsShippPage(driver); | ||
| 549 | + } | ||
| 550 | + | ||
| 529 | } | 551 | } |
| 530 | \ No newline at end of file | 552 | \ No newline at end of file |
src/main/java/com/essa/pageObject/LogisticShipp/BookingCarPage.java
0 → 100644
| @@ -0,0 +1,63 @@ | @@ -0,0 +1,63 @@ | ||
| 1 | +package com.essa.pageObject.LogisticShipp; | ||
| 2 | + | ||
| 3 | +import com.essa.framework.BasePage; | ||
| 4 | +import org.openqa.selenium.WebDriver; | ||
| 5 | +import org.openqa.selenium.WebElement; | ||
| 6 | +import org.openqa.selenium.support.FindBy; | ||
| 7 | + | ||
| 8 | +//订车页面 | ||
| 9 | +public class BookingCarPage extends BasePage { | ||
| 10 | + | ||
| 11 | + public BookingCarPage(WebDriver driver) { | ||
| 12 | + super(driver); | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + //订车看板 | ||
| 16 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/ul/li[4]") | ||
| 17 | + WebElement BookingCarBoard; | ||
| 18 | + | ||
| 19 | + //查询条件 | ||
| 20 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/div/div/div/form/div/div/input") | ||
| 21 | + WebElement SetQuery; | ||
| 22 | + | ||
| 23 | + //查询按钮 | ||
| 24 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/div/div/div/form/div/div/span/button/i") | ||
| 25 | + WebElement QueryBtn; | ||
| 26 | + | ||
| 27 | + //查询数据 | ||
| 28 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/div/div/div/table/tbody/tr/td[1]") | ||
| 29 | + WebElement QueryRsult; | ||
| 30 | + | ||
| 31 | + //订车按钮 | ||
| 32 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/div/div/div/div[1]/button[1]") | ||
| 33 | + WebElement BookingCarBtn; | ||
| 34 | + | ||
| 35 | + //订车类型 | ||
| 36 | + @FindBy(xpath = "//*[text()='贷代订车']") | ||
| 37 | + WebElement BookingCarSeclType; | ||
| 38 | + | ||
| 39 | + //预计到车日期 | ||
| 40 | + @FindBy(xpath = "//*[@name='expectTruckArrivingDate']") | ||
| 41 | + WebElement BookingCarDate; | ||
| 42 | + | ||
| 43 | + //确定按钮 | ||
| 44 | + @FindBy(xpath = "//button[@data-bb-handler='submit']") | ||
| 45 | + WebElement SubmitBtn; | ||
| 46 | + | ||
| 47 | + public BookingCarPage toBookingCarPage() { | ||
| 48 | + mywait(BookingCarBoard); | ||
| 49 | + click(BookingCarBoard); | ||
| 50 | + SetQuery.sendKeys("D180411T0278"); | ||
| 51 | + click(QueryBtn); | ||
| 52 | + forceWait(1000); | ||
| 53 | + click(QueryRsult); | ||
| 54 | + click(BookingCarBtn); | ||
| 55 | + mywait(BookingCarSeclType); | ||
| 56 | + click(BookingCarSeclType); | ||
| 57 | + mywait(BookingCarDate); | ||
| 58 | + jsExecutorRemoveAttribute(BookingCarDate, "readonly"); | ||
| 59 | + sendKeys(BookingCarDate, "2018/10/23"); | ||
| 60 | + click(SubmitBtn); | ||
| 61 | + return new BookingCarPage(driver); | ||
| 62 | + } | ||
| 63 | +} |
src/main/java/com/essa/pageObject/LogisticShipp/CabinInfoPage.java
0 → 100644
| @@ -0,0 +1,81 @@ | @@ -0,0 +1,81 @@ | ||
| 1 | +package com.essa.pageObject.LogisticShipp; | ||
| 2 | + | ||
| 3 | +import com.essa.framework.BasePage; | ||
| 4 | +import org.openqa.selenium.WebDriver; | ||
| 5 | +import org.openqa.selenium.WebElement; | ||
| 6 | +import org.openqa.selenium.support.FindBy; | ||
| 7 | + | ||
| 8 | +//船务看板-订舱-待订舱-订舱录入界面 | ||
| 9 | +public class CabinInfoPage extends BasePage { | ||
| 10 | + public CabinInfoPage(WebDriver driver) { | ||
| 11 | + super(driver); | ||
| 12 | + } | ||
| 13 | + | ||
| 14 | + public String FilePath = "C:\\Users\\hanlei\\Desktop\\1.png"; | ||
| 15 | + | ||
| 16 | + //订舱看板 | ||
| 17 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/ul/li[3]") | ||
| 18 | + WebElement BookingCabin; | ||
| 19 | + | ||
| 20 | + //记录 | ||
| 21 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/div/div/div/table/tbody/tr[1]/td/table/tbody/tr[1]") | ||
| 22 | + WebElement FirstDate; | ||
| 23 | + | ||
| 24 | + //输入框 | ||
| 25 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/div/div/div/form[1]/div/div/input") | ||
| 26 | + WebElement SetQuery; | ||
| 27 | + | ||
| 28 | + //查询按钮 | ||
| 29 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/div/div/div/form[1]/div/div/span/button") | ||
| 30 | + WebElement QueryBtn; | ||
| 31 | + | ||
| 32 | + //选择订舱条目 | ||
| 33 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/div/div/div/table/tbody/tr[1]/td/table/tbody/tr[1]/td[1]/input") | ||
| 34 | + WebElement SelectFirstDate; | ||
| 35 | + | ||
| 36 | + //订舱按钮 | ||
| 37 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/div/div/div/div[1]/button[1]") | ||
| 38 | + WebElement BookingCabinBtn; | ||
| 39 | + | ||
| 40 | + //订舱S/O号 | ||
| 41 | + @FindBy(xpath = "/html/body/div[6]/div/div/div[2]/div/form/div/div[1]/div/div[2]/div/div/input") | ||
| 42 | + WebElement SetCabinSONo; | ||
| 43 | + | ||
| 44 | + //最后装柜日期 | ||
| 45 | + @FindBy(xpath = "//*[@id='lastLoadTime']") | ||
| 46 | + WebElement LastLoadTimeSet; | ||
| 47 | + | ||
| 48 | + //选择文件 | ||
| 49 | + @FindBy(xpath = "//*[text()='点击选择文件...']") | ||
| 50 | + WebElement FileUp; | ||
| 51 | + | ||
| 52 | + //确定 | ||
| 53 | + @FindBy(xpath = "//button[@data-bb-handler='submit' and @type='button']") | ||
| 54 | + WebElement CommitBtn; | ||
| 55 | + | ||
| 56 | + //窗体 | ||
| 57 | + @FindBy(xpath = "/html/body/div[6]/div/div/div[2]/div") | ||
| 58 | + WebElement Body; | ||
| 59 | + | ||
| 60 | + public CabinInfoPage toCabinInfoPage() { | ||
| 61 | + click(BookingCabin); | ||
| 62 | + mywait(FirstDate); | ||
| 63 | + SetQuery.sendKeys("D180411T0278"); | ||
| 64 | + click(QueryBtn); | ||
| 65 | + mywait(SelectFirstDate); | ||
| 66 | + click(SelectFirstDate); | ||
| 67 | + click(BookingCabinBtn); | ||
| 68 | + mywait(SetCabinSONo); | ||
| 69 | + SetCabinSONo.sendKeys("TestCabinNo"); | ||
| 70 | + jsExecutorRemoveAttribute(LastLoadTimeSet, "readonly"); | ||
| 71 | + sendKeys(LastLoadTimeSet,"10/23/2018"); | ||
| 72 | +// LastLoadTimeSet.sendKeys("10/23/2018"); | ||
| 73 | + click(Body); | ||
| 74 | +// jsExecutorClick(FileUp); | ||
| 75 | + actionClick(FileUp); | ||
| 76 | + uploadFile(FilePath); | ||
| 77 | + forceWait(2000); | ||
| 78 | + click(CommitBtn); | ||
| 79 | + return new CabinInfoPage(driver); | ||
| 80 | + } | ||
| 81 | +} |
src/main/java/com/essa/pageObject/LogisticShipp/LargeDcofdPage.java
0 → 100644
| @@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
| 1 | +package com.essa.pageObject.LogisticShipp; | ||
| 2 | + | ||
| 3 | +import com.essa.framework.BasePage; | ||
| 4 | +import org.openqa.selenium.WebDriver; | ||
| 5 | +import org.openqa.selenium.WebElement; | ||
| 6 | +import org.openqa.selenium.support.FindBy; | ||
| 7 | + | ||
| 8 | +//大跟单确认备选船期待办界面 | ||
| 9 | +public class LargeDcofdPage extends BasePage { | ||
| 10 | + public LargeDcofdPage (WebDriver driver) { | ||
| 11 | + super(driver); | ||
| 12 | + } | ||
| 13 | + | ||
| 14 | + // 确认登记备选船期 | ||
| 15 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div[4]/span[1]/button[2]") | ||
| 16 | + WebElement ConfirmationShipDate; | ||
| 17 | + | ||
| 18 | + public LargeDcofdPage toLargeDcofdPage(){ | ||
| 19 | + mywait(ConfirmationShipDate); | ||
| 20 | + click(ConfirmationShipDate); | ||
| 21 | + return new LargeDcofdPage(driver); | ||
| 22 | + } | ||
| 23 | +} |
src/main/java/com/essa/pageObject/LogisticShipp/LogisticsShippPage.java
0 → 100644
| @@ -0,0 +1,61 @@ | @@ -0,0 +1,61 @@ | ||
| 1 | +package com.essa.pageObject.LogisticShipp; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.essa.framework.BasePage; | ||
| 5 | +import org.openqa.selenium.WebDriver; | ||
| 6 | +import org.openqa.selenium.WebElement; | ||
| 7 | +import org.openqa.selenium.support.FindBy; | ||
| 8 | + | ||
| 9 | +//船务看板-通知确认船务资料界面 | ||
| 10 | +public class LogisticsShippPage extends BasePage { | ||
| 11 | + public LogisticsShippPage(WebDriver driver) { | ||
| 12 | + super(driver); | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + // 通知确认船务资料看板 | ||
| 16 | + @FindBy(xpath = "//a[text()='通知确认船务资料']") | ||
| 17 | + WebElement NoticeBoard; | ||
| 18 | + | ||
| 19 | + //等待数据结构 | ||
| 20 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/table/tbody/tr[1]") | ||
| 21 | + WebElement resultDate; | ||
| 22 | + | ||
| 23 | + //订单编号输入框 | ||
| 24 | + @FindBy (xpath = "//input[@type='text' and @ng-model ='query.keyword']") | ||
| 25 | + WebElement setPono; | ||
| 26 | + | ||
| 27 | + //高级查询按钮 | ||
| 28 | + @FindBy (xpath = "//i[@class='iconfont icon-search']") | ||
| 29 | + WebElement querySubBtn; | ||
| 30 | + | ||
| 31 | + //查询结果 | ||
| 32 | + @FindBy (xpath = "//input[@type ='checkbox' and @checklist-value='item']") | ||
| 33 | + WebElement selectedpo; | ||
| 34 | + | ||
| 35 | + //点击通知确认船务资料 | ||
| 36 | + @FindBy (xpath = "//button[text()='通知确认船务资料']") | ||
| 37 | + WebElement skippSubBtn; | ||
| 38 | + | ||
| 39 | + //点击确认按钮 | ||
| 40 | + @FindBy (xpath = "//html/body/div[5]/div/div/div[2]/div/div/button[1]") | ||
| 41 | + WebElement submitSubBtn; | ||
| 42 | + | ||
| 43 | + //点击退出登录 | ||
| 44 | + @FindBy (xpath="//*[text()='退出']") | ||
| 45 | + WebElement logout; | ||
| 46 | + | ||
| 47 | + //搜索并通知业务补充船务资料 | ||
| 48 | + public LogisticsShippPage isSucceed() { | ||
| 49 | + click(NoticeBoard); | ||
| 50 | + mywait(resultDate); | ||
| 51 | + setPono.sendKeys("D180411T0278"); | ||
| 52 | + click(querySubBtn); | ||
| 53 | + mywait(selectedpo); | ||
| 54 | + click(selectedpo); | ||
| 55 | + mywait(selectedpo); | ||
| 56 | + click(skippSubBtn); | ||
| 57 | + mywait(submitSubBtn); | ||
| 58 | + click(submitSubBtn); | ||
| 59 | + return new LogisticsShippPage(driver); | ||
| 60 | + } | ||
| 61 | +} |
src/main/java/com/essa/pageObject/LogisticShipp/RegisOptShpDatePage.java
0 → 100644
| @@ -0,0 +1,53 @@ | @@ -0,0 +1,53 @@ | ||
| 1 | +package com.essa.pageObject.LogisticShipp; | ||
| 2 | + | ||
| 3 | +import com.essa.framework.BasePage; | ||
| 4 | +import org.openqa.selenium.WebDriver; | ||
| 5 | +import org.openqa.selenium.WebElement; | ||
| 6 | +import org.openqa.selenium.support.FindBy; | ||
| 7 | + | ||
| 8 | +//认领登记备选船期待办页面 | ||
| 9 | +public class RegisOptShpDatePage extends BasePage { | ||
| 10 | + public RegisOptShpDatePage (WebDriver driver) { | ||
| 11 | + super(driver); | ||
| 12 | + } | ||
| 13 | + | ||
| 14 | + // 认领登记备选船期任务 | ||
| 15 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div[4]/button") | ||
| 16 | + WebElement ClaimTask; | ||
| 17 | + | ||
| 18 | + // 添加船务信息 | ||
| 19 | + @FindBy(xpath = "//*[@id='wf_content']/div/div/button[1]") | ||
| 20 | + WebElement AddShippInfo; | ||
| 21 | + | ||
| 22 | + // 添加船公司 | ||
| 23 | + @FindBy(xpath = "//*[@id='wf_content']/form/table/tbody/tr/td/ng-form/div/div[1]/input") | ||
| 24 | + WebElement AddShippCompanyInfo; | ||
| 25 | + | ||
| 26 | + // 设置开船日期 | ||
| 27 | + @FindBy(xpath = "//*[@id='deliveryDate0']") | ||
| 28 | + WebElement SetdeliveryDate0; | ||
| 29 | + | ||
| 30 | + // 设置到岗日期 | ||
| 31 | + @FindBy(xpath = "//*[@id='estimatedArrivalDate0']") | ||
| 32 | + WebElement SetEstimatedArrivalDate0; | ||
| 33 | + | ||
| 34 | + // 提交 | ||
| 35 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div[4]/span[1]/button[2]") | ||
| 36 | + WebElement SubmitBtn; | ||
| 37 | + | ||
| 38 | + public RegisOptShpDatePage toRegisOptShpDatePage(){ | ||
| 39 | + mywait(ClaimTask); | ||
| 40 | + forceWait(1000); | ||
| 41 | + click(ClaimTask); | ||
| 42 | + mywait(AddShippInfo); | ||
| 43 | + click(AddShippInfo); | ||
| 44 | + mywait(AddShippCompanyInfo); | ||
| 45 | + AddShippCompanyInfo.sendKeys("TestShippCompanyInfo"); | ||
| 46 | + jsExecutorRemoveAttribute(SetdeliveryDate0, "readonly"); | ||
| 47 | + sendKeys(SetdeliveryDate0,"10/23/2018"); | ||
| 48 | + jsExecutorRemoveAttribute(SetEstimatedArrivalDate0, "readonly"); | ||
| 49 | + sendKeys(SetEstimatedArrivalDate0,"10/23/2018"); | ||
| 50 | + click(SubmitBtn); | ||
| 51 | + return new RegisOptShpDatePage(driver); | ||
| 52 | + } | ||
| 53 | +} |
src/main/java/com/essa/pageObject/LogisticShipp/SellerFillInfoPage.java
0 → 100644
| @@ -0,0 +1,127 @@ | @@ -0,0 +1,127 @@ | ||
| 1 | +package com.essa.pageObject.LogisticShipp; | ||
| 2 | + | ||
| 3 | +import com.essa.framework.BasePage; | ||
| 4 | +import org.openqa.selenium.WebDriver; | ||
| 5 | +import org.openqa.selenium.WebElement; | ||
| 6 | +import org.openqa.selenium.support.FindBy; | ||
| 7 | + | ||
| 8 | +//业务员补充船务资料待办页面 | ||
| 9 | +public class SellerFillInfoPage extends BasePage { | ||
| 10 | + public SellerFillInfoPage(WebDriver driver) { | ||
| 11 | + super(driver); | ||
| 12 | + } | ||
| 13 | + | ||
| 14 | + //选择货代来源 | ||
| 15 | + @FindBy(xpath = "//*[text()='ESSA指定']") | ||
| 16 | + WebElement AppointSet; | ||
| 17 | + | ||
| 18 | + //选择报关 | ||
| 19 | + @FindBy(xpath = "//*[@id='shippingPanel1']/div[2]/div/div/label[2]") | ||
| 20 | + WebElement DeclareSet; | ||
| 21 | + | ||
| 22 | + //选择货代 | ||
| 23 | + @FindBy(xpath = "//*[text()='请选择货代']") | ||
| 24 | + WebElement AppointCompanySet; | ||
| 25 | + | ||
| 26 | + //选择货代 | ||
| 27 | + @FindBy(xpath = "//*[text()='中外运']") | ||
| 28 | + WebElement AppointCompanySec; | ||
| 29 | + | ||
| 30 | + //确定选择货代 | ||
| 31 | + @FindBy(xpath = "//*[text()='确定']") | ||
| 32 | + WebElement CommitAppointCompanySec; | ||
| 33 | + | ||
| 34 | + //目标港口 | ||
| 35 | + @FindBy(xpath = "//*[@id='shippingPanel2']/div[2]/div/div/input") | ||
| 36 | + WebElement TargetPortSet; | ||
| 37 | + | ||
| 38 | + //发货人公司 | ||
| 39 | + @FindBy(xpath = "//*[text()='汕头伊斯卡玩具有限公司']") | ||
| 40 | + WebElement ConsignmentCompany; | ||
| 41 | + | ||
| 42 | + //收货公司 | ||
| 43 | + @FindBy(xpath = "//*[@id='shippingPanel4']/div[1]/ng-form/div/div/div[1]/div/div/input") | ||
| 44 | + WebElement HarvestCompany; | ||
| 45 | + | ||
| 46 | + //收货电话 | ||
| 47 | + @FindBy(xpath = "//*[@id='shippingPanel4']/div[1]/ng-form/div/div/div[3]/div/div/input") | ||
| 48 | + WebElement HarvestMobile; | ||
| 49 | + | ||
| 50 | + //收货传真 | ||
| 51 | + @FindBy(xpath = "//*[@id='shippingPanel4']/div[1]/ng-form/div/div/div[4]/div/div/input") | ||
| 52 | + WebElement HarvestFax; | ||
| 53 | + | ||
| 54 | + //收货邮编 | ||
| 55 | + @FindBy(xpath = "//*[@id='shippingPanel4']/div[1]/ng-form/div/div/div[5]/div/div/input") | ||
| 56 | + WebElement HarvestZipcode; | ||
| 57 | + | ||
| 58 | + //通知方公司 | ||
| 59 | + @FindBy(xpath = "//*[@id='shippingPanel4']/div[2]/ng-form/div/div/div[1]/div/div/input") | ||
| 60 | + WebElement SetNoticeCompany; | ||
| 61 | + | ||
| 62 | + //通知方电话号码 | ||
| 63 | + @FindBy(xpath = "//*[@id='shippingPanel4']/div[2]/ng-form/div/div/div[3]/div/div/input") | ||
| 64 | + WebElement SetNoticeMobile; | ||
| 65 | + | ||
| 66 | + //通知方邮编 | ||
| 67 | + @FindBy(xpath = "//*[@id='shippingPanel4']/div[2]/ng-form/div/div/div[5]/div/div/input") | ||
| 68 | + WebElement SetNoticeZipcode; | ||
| 69 | + | ||
| 70 | + //通知方传真 | ||
| 71 | + @FindBy(xpath = "//*[@id='shippingPanel4']/div[2]/ng-form/div/div/div[4]/div/div/input") | ||
| 72 | + WebElement SetNoticeFix; | ||
| 73 | + | ||
| 74 | + //寄单公司名称 | ||
| 75 | + @FindBy(xpath = "//*[@id='shippingPanel5']/div[7]/div/div/div[1]/div/div/input") | ||
| 76 | + WebElement MailCompanyName; | ||
| 77 | + | ||
| 78 | + //寄单联系人名称 | ||
| 79 | + @FindBy(xpath = "//*[@id='shippingPanel5']/div[7]/div/div/div[2]/div/div/input") | ||
| 80 | + WebElement MailConnecter; | ||
| 81 | + | ||
| 82 | + //寄单联系人名称 | ||
| 83 | + @FindBy(xpath = "//*[@id='shippingPanel5']/div[7]/div/div/div[3]/div/div/input") | ||
| 84 | + WebElement MailPhone; | ||
| 85 | + | ||
| 86 | + //寄单邮编 | ||
| 87 | + @FindBy(xpath = "//*[@id='shippingPanel5']/div[7]/div/div/div[4]/div/div/input") | ||
| 88 | + WebElement MailZipcode; | ||
| 89 | + | ||
| 90 | + //寄单传真 | ||
| 91 | + @FindBy(xpath = "//*[@id='shippingPanel4']/div[2]/ng-form/div/div/div[4]/div/div/input") | ||
| 92 | + WebElement MailFax; | ||
| 93 | + | ||
| 94 | + //寄单邮编 | ||
| 95 | + @FindBy(xpath = "//*[text()='确认']") | ||
| 96 | + WebElement SubmitBtn; | ||
| 97 | + | ||
| 98 | + public SellerFillInfoPage toSellerFillInfo() { | ||
| 99 | + mywait(AppointSet); | ||
| 100 | + click(AppointSet); | ||
| 101 | + click(DeclareSet); | ||
| 102 | + click(AppointCompanySet); | ||
| 103 | + mywait(AppointCompanySec); | ||
| 104 | + click(AppointCompanySec); | ||
| 105 | + click(CommitAppointCompanySec); | ||
| 106 | + mywait(TargetPortSet); | ||
| 107 | + TargetPortSet.sendKeys("TestPort"); | ||
| 108 | + click(ConsignmentCompany); | ||
| 109 | + HarvestCompany.sendKeys("TestCompany"); | ||
| 110 | + HarvestMobile.sendKeys("15888889999"); | ||
| 111 | + HarvestFax.sendKeys("TestFax@test.com"); | ||
| 112 | + HarvestZipcode.sendKeys("000000"); | ||
| 113 | + | ||
| 114 | + SetNoticeCompany.sendKeys("TestNoticeCompany"); | ||
| 115 | + SetNoticeMobile.sendKeys("15888889999"); | ||
| 116 | + SetNoticeFix.sendKeys("TestNoticeFix@test.com"); | ||
| 117 | + SetNoticeZipcode.sendKeys("000000"); | ||
| 118 | + | ||
| 119 | + MailCompanyName.sendKeys("TestMailCompanyName"); | ||
| 120 | + MailConnecter.sendKeys("TestMailConnecter"); | ||
| 121 | + MailPhone.sendKeys("TestMailPhone"); | ||
| 122 | + MailZipcode.sendKeys("TestMailZipCode"); | ||
| 123 | + MailFax.sendKeys("TestMailFax"); | ||
| 124 | + click(SubmitBtn); | ||
| 125 | + return new SellerFillInfoPage(driver); | ||
| 126 | + } | ||
| 127 | +} |
src/main/java/com/essa/pageObject/LogisticShipp/SendCarPage.java
0 → 100644
| @@ -0,0 +1,65 @@ | @@ -0,0 +1,65 @@ | ||
| 1 | +package com.essa.pageObject.LogisticShipp; | ||
| 2 | + | ||
| 3 | +import com.essa.framework.BasePage; | ||
| 4 | +import org.openqa.selenium.WebDriver; | ||
| 5 | +import org.openqa.selenium.WebElement; | ||
| 6 | +import org.openqa.selenium.support.FindBy; | ||
| 7 | + | ||
| 8 | +//确认发车页面 | ||
| 9 | +public class SendCarPage extends BasePage { | ||
| 10 | + public SendCarPage(WebDriver driver) { | ||
| 11 | + super(driver); | ||
| 12 | + } | ||
| 13 | + | ||
| 14 | + //订车看板 | ||
| 15 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/ul/li[4]") | ||
| 16 | + WebElement BookingCarBoard; | ||
| 17 | + | ||
| 18 | + //待发车看板 | ||
| 19 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/ul/li[2]") | ||
| 20 | + WebElement WaitForBookingCarBoard; | ||
| 21 | + | ||
| 22 | + //查询 | ||
| 23 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/div/div/div/form/div/div/input") | ||
| 24 | + WebElement QueryWaitForBooking; | ||
| 25 | + | ||
| 26 | + //查询按钮 | ||
| 27 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/div/div/div/form/div/div/span/button") | ||
| 28 | + WebElement QueryWaitForBookingCarBtn; | ||
| 29 | + | ||
| 30 | + //查询结果 | ||
| 31 | + @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/div/div/div/table/tbody/tr") | ||
| 32 | + WebElement FristWaitForBookingCarDate; | ||
| 33 | + | ||
| 34 | + //发车确认 | ||
| 35 | + @FindBy(xpath = "//*[text()='发车确认']") | ||
| 36 | + WebElement ConfirmBookingCar; | ||
| 37 | + | ||
| 38 | + //柜号 | ||
| 39 | + @FindBy(xpath = "//*[@name='containerNo']") | ||
| 40 | + WebElement SetContainerNo; | ||
| 41 | + | ||
| 42 | + //封条号 | ||
| 43 | + @FindBy(xpath = "//*[@name='sealNo']") | ||
| 44 | + WebElement SetSealNo; | ||
| 45 | + | ||
| 46 | + //确认发车 | ||
| 47 | + @FindBy(xpath = "//*[@data-bb-handler='submit']") | ||
| 48 | + WebElement SubmitBtn; | ||
| 49 | + | ||
| 50 | + public SendCarPage toSendCarPage() { | ||
| 51 | + click(BookingCarBoard); | ||
| 52 | + mywait(WaitForBookingCarBoard); | ||
| 53 | + click(WaitForBookingCarBoard); | ||
| 54 | + QueryWaitForBooking.sendKeys("D180411T0278"); | ||
| 55 | + click(QueryWaitForBookingCarBtn); | ||
| 56 | + mywait(FristWaitForBookingCarDate); | ||
| 57 | + click(FristWaitForBookingCarDate); | ||
| 58 | + click(ConfirmBookingCar); | ||
| 59 | + mywait(SetContainerNo); | ||
| 60 | + SetContainerNo.sendKeys("TestContainerNo"); | ||
| 61 | + SetSealNo.sendKeys("TestSealNo"); | ||
| 62 | + click(SubmitBtn); | ||
| 63 | + return new SendCarPage(driver); | ||
| 64 | + } | ||
| 65 | +} |