Commit c39107775b07f4bd98dffc8a970a4d077939be74
1 parent
d15bbfd4
by zengjin10-25
Showing
11 changed files
with
445 additions
and
5 deletions
Show diff stats
.gitignore
src/test/java/com/essa/framework/Model.java
| ... | ... | @@ -6,7 +6,7 @@ package com.essa.framework; |
| 6 | 6 | */ |
| 7 | 7 | public class Model { |
| 8 | 8 | |
| 9 | - public static String skuNo;//商品编号 | |
| 9 | + public static String skuNo="200056786";//商品编号 | |
| 10 | 10 | public static String buyerNo;//采购商编号 |
| 11 | 11 | public static String supplierName;//供应商名称 |
| 12 | 12 | public static String picPath;//图片路径 |
| ... | ... | @@ -15,7 +15,7 @@ public class Model { |
| 15 | 15 | public static String env;//所选环境 |
| 16 | 16 | public static String buyerAccount;//采购商账号 |
| 17 | 17 | public static String buyerPassword;//采购商密码 |
| 18 | - public static String poNum;//po单号 | |
| 18 | + public static String poNum="A181107T9194B";//po单号 | |
| 19 | 19 | public static int isactivity=0;//是否是活动商品 1:是 0:否 |
| 20 | 20 | public static String manager;//商品的类目经理 |
| 21 | 21 | public static String serialNum;//待办流水号 | ... | ... |
src/test/java/com/essa/pageObject/HomePage.java
| ... | ... | @@ -12,6 +12,8 @@ import com.essa.pageObject.GoodsManage.GoodsBankPage; |
| 12 | 12 | import com.essa.pageObject.GoodsManage.GoodsRelesePage; |
| 13 | 13 | import com.essa.pageObject.GoodsManage.MarketGoodsRelesePage; |
| 14 | 14 | import com.essa.pageObject.PODocumentary.PODocumentaryListPage; |
| 15 | +import com.essa.pageObject.StorageManage.GoodsReceiveTaskPage; | |
| 16 | +import com.essa.pageObject.StorageManage.NoticeReceivePage; | |
| 15 | 17 | import com.essa.pageObject.buyPlaneManage.SkuCategoryManagerCongfigPage; |
| 16 | 18 | import com.essa.pageObject.buyerManage.InvateCodePage; |
| 17 | 19 | import com.essa.pageObject.inquiryManage.ProductInquiryTaskPage; |
| ... | ... | @@ -132,6 +134,10 @@ public class HomePage extends BasePage{ |
| 132 | 134 | @FindBy (xpath = "//*[@title='采购计划审核流程']") |
| 133 | 135 | WebElement purchasePlaneProcess; |
| 134 | 136 | |
| 137 | + //待办中的“船务确认备选船期流程” | |
| 138 | + @FindBy (xpath = "//*[text()='船务确认备选船期流程']") | |
| 139 | + WebElement confirmDailingDate; | |
| 140 | + | |
| 135 | 141 | //第一条待办 |
| 136 | 142 | @FindBy (xpath = "//*[@ng-table='tableParams']/tbody/tr[1]") |
| 137 | 143 | WebElement firstNeedDealt; |
| ... | ... | @@ -152,6 +158,18 @@ public class HomePage extends BasePage{ |
| 152 | 158 | @FindBy (xpath ="//*[text()='PO跟单']") |
| 153 | 159 | WebElement PODocumentary; |
| 154 | 160 | |
| 161 | + //仓储管理 | |
| 162 | + @FindBy (xpath = "//span[contains(text(),'仓储管理')]") | |
| 163 | + WebElement StorageManage; | |
| 164 | + | |
| 165 | + //收货通知 | |
| 166 | + @FindBy (xpath = "//a[@name='child.text'][contains(text(),'收货通知')]") | |
| 167 | + WebElement NoticeReceive; | |
| 168 | + | |
| 169 | + //收货任务管理 | |
| 170 | + @FindBy (xpath = "//a[contains(text(),'收货任务管理')]") | |
| 171 | + WebElement goodsReceiveTask; | |
| 172 | + | |
| 155 | 173 | /* |
| 156 | 174 | * 方法 |
| 157 | 175 | */ |
| ... | ... | @@ -359,8 +377,39 @@ public class HomePage extends BasePage{ |
| 359 | 377 | * @return PO跟单列表页 |
| 360 | 378 | */ |
| 361 | 379 | public PODocumentaryListPage toPoDocumentaryListPage() { |
| 380 | + mywait(DocumentaryManage); | |
| 362 | 381 | click(DocumentaryManage); |
| 363 | 382 | click(PODocumentary); |
| 364 | 383 | return new PODocumentaryListPage(driver); |
| 365 | 384 | } |
| 385 | + | |
| 386 | + /** | |
| 387 | + * 进入收货通知页面 | |
| 388 | + * @return 收货通知页面 | |
| 389 | + */ | |
| 390 | + public NoticeReceivePage toNoticeReceivePage() { | |
| 391 | + click(StorageManage); | |
| 392 | + click(NoticeReceive); | |
| 393 | + return new NoticeReceivePage(driver); | |
| 394 | + } | |
| 395 | + | |
| 396 | + /** | |
| 397 | + * 进入收货任务管理 | |
| 398 | + * @return 收货任务管理页面 | |
| 399 | + */ | |
| 400 | + public GoodsReceiveTaskPage toGoodsReceiveTaskPage() { | |
| 401 | + click(StorageManage); | |
| 402 | + click(goodsReceiveTask); | |
| 403 | + return new GoodsReceiveTaskPage(driver); | |
| 404 | + } | |
| 405 | + /** | |
| 406 | + * 大跟单进入第一个需要确认备选船期的待办页面 | |
| 407 | + * @return 确认船期页面 | |
| 408 | + */ | |
| 409 | + public NeedDealtApplyPage toSailingDateConfirmPage() { | |
| 410 | + click(confirmDailingDate); | |
| 411 | + click(firstNeedDealt); | |
| 412 | + switchMoreWindow(); | |
| 413 | + return new NeedDealtApplyPage(driver); | |
| 414 | + } | |
| 366 | 415 | } |
| 367 | 416 | \ No newline at end of file | ... | ... |
src/test/java/com/essa/pageObject/PODocumentary/ConvertTailPage.java
0 → 100644
| ... | ... | @@ -0,0 +1,51 @@ |
| 1 | +package com.essa.pageObject.PODocumentary; | |
| 2 | + | |
| 3 | +import org.openqa.selenium.By; | |
| 4 | +import org.openqa.selenium.WebDriver; | |
| 5 | +import org.openqa.selenium.WebElement; | |
| 6 | +import org.openqa.selenium.support.FindBy; | |
| 7 | + | |
| 8 | +import com.essa.framework.BasePage; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 转在途尾货页面 | |
| 12 | + * @author Administrator | |
| 13 | + * | |
| 14 | + */ | |
| 15 | +public class ConvertTailPage extends BasePage { | |
| 16 | + | |
| 17 | + public ConvertTailPage(WebDriver driver) { | |
| 18 | + super(driver); | |
| 19 | + } | |
| 20 | + /* | |
| 21 | + * 元素定位 | |
| 22 | + */ | |
| 23 | + @FindBy (xpath = "//*[@name='tailDeliveryDay']") | |
| 24 | + WebElement tailDeliveryDay;//尾货货期 | |
| 25 | + | |
| 26 | + @FindBy (xpath ="//*[@name='moveOutQuantity']") | |
| 27 | + WebElement moveOutQuantity;//转出箱数 | |
| 28 | + | |
| 29 | + @FindBy (xpath ="//button[text()='保存']") | |
| 30 | + WebElement save;//保存 | |
| 31 | + | |
| 32 | + @FindBy (xpath ="//button[text()='确定']") | |
| 33 | + WebElement confirm;//保存 | |
| 34 | + | |
| 35 | + /* | |
| 36 | + * 页面方法 | |
| 37 | + */ | |
| 38 | + /** | |
| 39 | + * 对sku转在途尾货 | |
| 40 | + * @return PO单看板页面 | |
| 41 | + */ | |
| 42 | + public POBoardPage convertTail() { | |
| 43 | + dynamicWait(By.xpath("//*[@name='tailDeliveryDay']")); | |
| 44 | + sendKeys(tailDeliveryDay, "7"); | |
| 45 | + sendKeys(moveOutQuantity, "2"); | |
| 46 | + click(save); | |
| 47 | + dynamicWait(By.xpath("//button[text()='确定']")); | |
| 48 | + click(confirm); | |
| 49 | + return new POBoardPage(driver); | |
| 50 | + } | |
| 51 | +} | ... | ... |
src/test/java/com/essa/pageObject/PODocumentary/POBoardPage.java
| 1 | 1 | package com.essa.pageObject.PODocumentary; |
| 2 | 2 | |
| 3 | +import org.openqa.selenium.By; | |
| 3 | 4 | import org.openqa.selenium.WebDriver; |
| 5 | +import org.openqa.selenium.WebElement; | |
| 6 | +import org.openqa.selenium.support.FindBy; | |
| 4 | 7 | |
| 5 | 8 | import com.essa.framework.BasePage; |
| 9 | +import com.essa.framework.Model; | |
| 6 | 10 | |
| 11 | +/** | |
| 12 | + * PO单看板页面 | |
| 13 | + * @author Administrator | |
| 14 | + * | |
| 15 | + */ | |
| 7 | 16 | public class POBoardPage extends BasePage { |
| 8 | 17 | |
| 9 | 18 | public POBoardPage(WebDriver driver) { |
| 10 | 19 | super(driver); |
| 11 | 20 | } |
| 12 | - | |
| 21 | + | |
| 22 | + /* | |
| 23 | + * 元素定位 | |
| 24 | + */ | |
| 25 | + @FindBy (xpath = "//*[text()='订单任务看板']") | |
| 26 | + WebElement taskBoard;//订单任务看板 | |
| 27 | + | |
| 28 | + @FindBy (xpath = "//*[@ng-model='keyword']") | |
| 29 | + WebElement keyword;//关键字查询输入框 | |
| 30 | + | |
| 31 | + @FindBy (xpath ="//*[@ng-model='keyword']/../span/button") | |
| 32 | + WebElement search;//查询按钮 | |
| 33 | + | |
| 34 | + @FindBy (xpath = "//*[@id='detailView']/div/div[3]/div[1]/div/div/table/tbody/tr[1]/td/div[2]/div[1]/input") | |
| 35 | + WebElement firstCheckbox;//第一个复选框 | |
| 36 | + | |
| 37 | + @FindBy (xpath ="//button[contains(text(),'转在途尾货')]") | |
| 38 | + WebElement toTail;//转在途尾货按钮 | |
| 39 | + | |
| 40 | + @FindBy (xpath = "//button[contains(text(),'通知收货')]") | |
| 41 | + WebElement noticeReceive;//通知收货按钮 | |
| 42 | + | |
| 43 | + @FindBy (xpath ="//button[contains(text(),'通知装柜')]") | |
| 44 | + WebElement noticeLoad;//通知装柜按钮 | |
| 45 | + | |
| 46 | + /* | |
| 47 | + * 页面方法 | |
| 48 | + */ | |
| 49 | + /** | |
| 50 | + * 转在途尾货 | |
| 51 | + * @return 转在途尾货页面 | |
| 52 | + */ | |
| 53 | + public ConvertTailPage toTail() { | |
| 54 | + dynamicLoad(By.xpath("//*[style='display: block;']"));//等待页面加载完成 | |
| 55 | + click(taskBoard); | |
| 56 | + dynamicLoad(By.xpath("//*[style='display: block;']")); | |
| 57 | + sendKeys(keyword, Model.getSkuNo()); | |
| 58 | + click(search); | |
| 59 | + dynamicLoad(By.xpath("//*[style='display: block;']")); | |
| 60 | + click(firstCheckbox); | |
| 61 | + click(toTail); | |
| 62 | + return new ConvertTailPage(driver); | |
| 63 | + } | |
| 64 | + | |
| 13 | 65 | } | ... | ... |
src/test/java/com/essa/pageObject/PODocumentary/PODocumentaryListPage.java
| 1 | 1 | package com.essa.pageObject.PODocumentary; |
| 2 | 2 | |
| 3 | +import org.openqa.selenium.By; | |
| 3 | 4 | import org.openqa.selenium.WebDriver; |
| 4 | 5 | import org.openqa.selenium.WebElement; |
| 5 | 6 | import org.openqa.selenium.support.FindBy; |
| 6 | 7 | |
| 7 | 8 | import com.essa.framework.BasePage; |
| 9 | +import com.essa.framework.Model; | |
| 8 | 10 | |
| 9 | 11 | /** |
| 10 | 12 | * @author Administrator |
| ... | ... | @@ -22,6 +24,25 @@ public class PODocumentaryListPage extends BasePage { |
| 22 | 24 | @FindBy (xpath = "//*[contains(text(),'高级查询')]") |
| 23 | 25 | WebElement advancedQuery;//高级查询 |
| 24 | 26 | |
| 25 | - @FindBy (xpath = "//*[contains(@placeholder,'请输入PO单号')]") | |
| 26 | - WebElement OrderNo; | |
| 27 | + @FindBy (xpath = "//*[text()='PO单号:']/../div[1]/input") | |
| 28 | + WebElement OrderNo;//PO单号 | |
| 29 | + | |
| 30 | + @FindBy (xpath = "//*[text()='查询']") | |
| 31 | + WebElement search;//查询按钮 | |
| 32 | + | |
| 33 | + @FindBy (xpath = "//*[@id='listView']/div/table/tbody/tr[1]/td/div/div[1]/div/ul/li[1]/a") | |
| 34 | + WebElement detail;//搜索结果中的一个查看详情 | |
| 35 | + | |
| 36 | + /* | |
| 37 | + * 页面方法 | |
| 38 | + */ | |
| 39 | + public POBoardPage todetail() { | |
| 40 | + mywait(detail); | |
| 41 | + click(advancedQuery); | |
| 42 | + sendKeys(OrderNo, Model.getPoNum()); | |
| 43 | + click(search); | |
| 44 | + dynamicLoad(By.xpath("//*[style='display: block;']")); | |
| 45 | + click(detail); | |
| 46 | + return new POBoardPage(driver); | |
| 47 | + } | |
| 27 | 48 | } | ... | ... |
src/test/java/com/essa/pageObject/StorageManage/GoodsReceiveTaskPage.java
0 → 100644
| ... | ... | @@ -0,0 +1,53 @@ |
| 1 | +package com.essa.pageObject.StorageManage; | |
| 2 | + | |
| 3 | +import org.openqa.selenium.By; | |
| 4 | +import org.openqa.selenium.WebDriver; | |
| 5 | +import org.openqa.selenium.WebElement; | |
| 6 | +import org.openqa.selenium.support.FindBy; | |
| 7 | + | |
| 8 | +import com.essa.framework.BasePage; | |
| 9 | +import com.essa.framework.Model; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 收货任务管理页面 | |
| 13 | + * @author Administrator | |
| 14 | + * | |
| 15 | + */ | |
| 16 | +public class GoodsReceiveTaskPage extends BasePage { | |
| 17 | + | |
| 18 | + public GoodsReceiveTaskPage(WebDriver driver) { | |
| 19 | + super(driver); | |
| 20 | + } | |
| 21 | + | |
| 22 | + /* | |
| 23 | + * 元素定位 | |
| 24 | + */ | |
| 25 | + @FindBy (xpath = "//*[@name='selectKey']") | |
| 26 | + WebElement keyword;//关键字查询 | |
| 27 | + | |
| 28 | + @FindBy (xpath = "//button[contains(@ng-click,'search')]") | |
| 29 | + WebElement search;//查询按钮 | |
| 30 | + | |
| 31 | + @FindBy (xpath = "//tbody/tr[1]") | |
| 32 | + WebElement firstResult;//列表第一个结果 | |
| 33 | + | |
| 34 | + @FindBy (xpath = "//button[contains(text(),'处理')]") | |
| 35 | + WebElement deal;//处理 | |
| 36 | + | |
| 37 | + /* | |
| 38 | + * 页面方法 | |
| 39 | + */ | |
| 40 | + /** | |
| 41 | + * 选择第一个筛选结果,点击处理 | |
| 42 | + * @return PO收货任务处理页 | |
| 43 | + */ | |
| 44 | + public GoodsReceiveTaskPage dealReceive() { | |
| 45 | + dynamicWait(By.xpath("//tbody/tr[1]")); | |
| 46 | + sendKeys(keyword, Model.getPoNum()); | |
| 47 | + click(search); | |
| 48 | + dynamicWait(By.xpath("//div[@style='display: none;' and @id='mask']")); | |
| 49 | + click(firstResult); | |
| 50 | + click(deal); | |
| 51 | + return new GoodsReceiveTaskPage(driver); | |
| 52 | + } | |
| 53 | +} | ... | ... |
src/test/java/com/essa/pageObject/StorageManage/NoticeReceivePage.java
0 → 100644
| ... | ... | @@ -0,0 +1,75 @@ |
| 1 | +package com.essa.pageObject.StorageManage; | |
| 2 | + | |
| 3 | +import org.openqa.selenium.By; | |
| 4 | +import org.openqa.selenium.WebDriver; | |
| 5 | +import org.openqa.selenium.WebElement; | |
| 6 | +import org.openqa.selenium.support.FindBy; | |
| 7 | + | |
| 8 | +import com.essa.framework.BasePage; | |
| 9 | +import com.essa.framework.Model; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * @author Administrator | |
| 13 | + *收货通知页面 | |
| 14 | + */ | |
| 15 | +public class NoticeReceivePage extends BasePage { | |
| 16 | + | |
| 17 | + public NoticeReceivePage(WebDriver driver) { | |
| 18 | + super(driver); | |
| 19 | + } | |
| 20 | + /* | |
| 21 | + * 元素定位 | |
| 22 | + */ | |
| 23 | + | |
| 24 | + @FindBy (xpath = "//input[@name='keyword']") | |
| 25 | + WebElement keyword;//关键字查询 | |
| 26 | + | |
| 27 | + @FindBy (xpath = "//button[contains(@ng-click,'search')]") | |
| 28 | + WebElement search;//查询按钮 | |
| 29 | + | |
| 30 | + @FindBy (xpath = "//td[@data-title=\"'PO装柜仓库'\"]//span[@class='ng-scope'][contains(text(),'设置')]") | |
| 31 | + WebElement set;//PO装柜仓库的“设置” | |
| 32 | + | |
| 33 | + @FindBy (xpath = "//*[@ng-click='chooseWarehouse(warehouse)']/../li[1]") | |
| 34 | + WebElement wareHouse;//仓库 | |
| 35 | + | |
| 36 | + @FindBy (xpath = "//*[@ng-click='chooseZone(zone)']/../li[1]") | |
| 37 | + WebElement zone;//区位 | |
| 38 | + | |
| 39 | + @FindBy (xpath = "//*[@ng-click='chooseShelf(shelf)']/../li[1]") | |
| 40 | + WebElement shelf;//货区 | |
| 41 | + | |
| 42 | + @FindBy (xpath = "//button[contains(text(),'确定')]") | |
| 43 | + WebElement confirm;//确定 | |
| 44 | + | |
| 45 | + @FindBy (xpath ="//button[@data-bb-handler='confirm']") | |
| 46 | + WebElement sysch;//是否同步提示框的确定按钮 | |
| 47 | + | |
| 48 | + @FindBy (xpath ="//button[@data-bb-handler='ok']") | |
| 49 | + WebElement succeed;//设置成功的确定按钮 | |
| 50 | + | |
| 51 | + /* | |
| 52 | + * 页面方法 | |
| 53 | + */ | |
| 54 | + | |
| 55 | + /** | |
| 56 | + * 设置装柜仓库 | |
| 57 | + */ | |
| 58 | + public void setWareHouse() { | |
| 59 | + dynamicWait(By.xpath("//div[@style='display: none;' and @id='mask']")); | |
| 60 | + sendKeys(keyword, Model.getPoNum()); | |
| 61 | + click(search); | |
| 62 | + dynamicWait(By.xpath("//div[@style='display: none;' and @id='mask']")); | |
| 63 | + click(set); | |
| 64 | + forceWait(500); | |
| 65 | + click(wareHouse); | |
| 66 | + click(zone); | |
| 67 | + click(shelf); | |
| 68 | + click(confirm); | |
| 69 | + forceWait(1000); | |
| 70 | + click(sysch); | |
| 71 | + forceWait(1000); | |
| 72 | + click(succeed); | |
| 73 | + } | |
| 74 | + | |
| 75 | +} | ... | ... |
src/test/java/com/essa/pageObject/StorageManage/ReceiveTaskDealPage.java
0 → 100644
| ... | ... | @@ -0,0 +1,44 @@ |
| 1 | +package com.essa.pageObject.StorageManage; | |
| 2 | + | |
| 3 | +import org.openqa.selenium.By; | |
| 4 | +import org.openqa.selenium.WebDriver; | |
| 5 | +import org.openqa.selenium.WebElement; | |
| 6 | +import org.openqa.selenium.support.FindBy; | |
| 7 | + | |
| 8 | +import com.essa.framework.BasePage; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * PO收货任务处理页面 | |
| 12 | + * @author Administrator | |
| 13 | + * | |
| 14 | + */ | |
| 15 | +public class ReceiveTaskDealPage extends BasePage { | |
| 16 | + | |
| 17 | + public ReceiveTaskDealPage(WebDriver driver) { | |
| 18 | + super(driver); | |
| 19 | + } | |
| 20 | + | |
| 21 | + @FindBy (xpath = "//*[text()='全部完成收货']") | |
| 22 | + WebElement allReceive;//全部收货完成 | |
| 23 | + | |
| 24 | + @FindBy (xpath = "//*[text()='确定']") | |
| 25 | + WebElement confirm;//确定 | |
| 26 | + | |
| 27 | + /* | |
| 28 | + * 页面方法 | |
| 29 | + */ | |
| 30 | + /** | |
| 31 | + * 全部收货完成 | |
| 32 | + * @return 收货任务管理页 | |
| 33 | + */ | |
| 34 | + public GoodsReceiveTaskPage allReceive() { | |
| 35 | + forceWait(1000); | |
| 36 | + dynamicWait(By.xpath("//div[@style='display: none;' and @id='mask']")); | |
| 37 | + click(allReceive); | |
| 38 | + forceWait(500); | |
| 39 | + click(confirm); | |
| 40 | + forceWait(1000); | |
| 41 | + click(confirm); | |
| 42 | + return new GoodsReceiveTaskPage(driver); | |
| 43 | + } | |
| 44 | +} | ... | ... |
src/test/java/com/essa/pageObject/needDealt/NeedDealtApplyPage.java
| ... | ... | @@ -103,4 +103,12 @@ public class NeedDealtApplyPage extends BasePage { |
| 103 | 103 | dynamicLoad(By.xpath("//*[style='display: block;']")); |
| 104 | 104 | return new HomePage(driver); |
| 105 | 105 | } |
| 106 | + | |
| 107 | + public HomePage confirmSailingDate() { | |
| 108 | + mywait(checkpoint); | |
| 109 | + forceWait(1000); | |
| 110 | + Model.setSerialNum(partialStr(serialNumber.getText(), "流水号:")); | |
| 111 | + click(confirm); | |
| 112 | + return new HomePage(driver); | |
| 113 | + } | |
| 106 | 114 | } | ... | ... |
| ... | ... | @@ -0,0 +1,86 @@ |
| 1 | +package com.essa.testSuite; | |
| 2 | + | |
| 3 | +import org.openqa.selenium.WebDriver; | |
| 4 | +import org.openqa.selenium.support.PageFactory; | |
| 5 | +import org.testng.annotations.AfterClass; | |
| 6 | +import org.testng.annotations.BeforeClass; | |
| 7 | +import org.testng.annotations.Test; | |
| 8 | + | |
| 9 | +import com.essa.pageObject.BaseTest; | |
| 10 | +import com.essa.pageObject.HomePage; | |
| 11 | +import com.essa.pageObject.PODocumentary.ConvertTailPage; | |
| 12 | +import com.essa.pageObject.PODocumentary.POBoardPage; | |
| 13 | +import com.essa.pageObject.PODocumentary.PODocumentaryListPage; | |
| 14 | +import com.essa.pageObject.StorageManage.GoodsReceiveTaskPage; | |
| 15 | +import com.essa.pageObject.StorageManage.NoticeReceivePage; | |
| 16 | +import com.essa.pageObject.StorageManage.ReceiveTaskDealPage; | |
| 17 | +import com.essa.pageObject.needDealt.NeedDealtApplyPage; | |
| 18 | + | |
| 19 | +public class TestTail extends BaseTest { | |
| 20 | + WebDriver driver; | |
| 21 | + | |
| 22 | + @BeforeClass | |
| 23 | + public void setUp() { | |
| 24 | + initsetUp(); | |
| 25 | + loginValid("yuwanhang"); | |
| 26 | + } | |
| 27 | + | |
| 28 | + @AfterClass | |
| 29 | + public void tearDown() { | |
| 30 | + driver.quit(); | |
| 31 | + } | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 转尾货 | |
| 35 | + */ | |
| 36 | + @Test | |
| 37 | + public void testTail() { | |
| 38 | + driver = getDriver(); | |
| 39 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
| 40 | + PODocumentaryListPage poDocumentaryListPage = PageFactory.initElements(driver, PODocumentaryListPage.class); | |
| 41 | + POBoardPage poBoardPage = PageFactory.initElements(driver, POBoardPage.class); | |
| 42 | + ConvertTailPage convertTailPage = PageFactory.initElements(driver, ConvertTailPage.class); | |
| 43 | + homePage.toPoDocumentaryListPage(); | |
| 44 | + poDocumentaryListPage.todetail(); | |
| 45 | + poBoardPage.toTail(); | |
| 46 | + convertTailPage.convertTail(); | |
| 47 | + } | |
| 48 | + | |
| 49 | + /** | |
| 50 | + * 设置收货、装柜的仓库地址 | |
| 51 | + */ | |
| 52 | + @Test | |
| 53 | + public void noticReceive() { | |
| 54 | + driver = getDriver(); | |
| 55 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
| 56 | + NoticeReceivePage noticeReceivePage = PageFactory.initElements(driver, NoticeReceivePage.class); | |
| 57 | + homePage.toNoticeReceivePage(); | |
| 58 | + noticeReceivePage.setWareHouse(); | |
| 59 | + } | |
| 60 | + | |
| 61 | + /** | |
| 62 | + * 收货通知处理 | |
| 63 | + */ | |
| 64 | + @Test | |
| 65 | + public void dealWithDelivery() { | |
| 66 | + driver = getDriver(); | |
| 67 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
| 68 | + GoodsReceiveTaskPage goodsReceiveTaskPage = PageFactory.initElements(driver, GoodsReceiveTaskPage.class); | |
| 69 | + ReceiveTaskDealPage receiveTaskDealPage = PageFactory.initElements(driver, ReceiveTaskDealPage.class); | |
| 70 | + homePage.toGoodsReceiveTaskPage(); | |
| 71 | + goodsReceiveTaskPage.dealReceive(); | |
| 72 | + receiveTaskDealPage.allReceive(); | |
| 73 | + } | |
| 74 | + | |
| 75 | + /** | |
| 76 | + * 大跟单确认船期 | |
| 77 | + */ | |
| 78 | + @Test | |
| 79 | + public void confirmSailingDate() { | |
| 80 | + driver = getDriver(); | |
| 81 | + HomePage homePage = PageFactory.initElements(driver, HomePage.class); | |
| 82 | + NeedDealtApplyPage needDealtApplyPage = PageFactory.initElements(driver, NeedDealtApplyPage.class); | |
| 83 | + homePage.toSailingDateConfirmPage(); | |
| 84 | + needDealtApplyPage.confirmSailingDate(); | |
| 85 | + } | |
| 86 | +} | ... | ... |