Commit 7240d47434ad2c03903af97135f424c9f7dac8fd
1 parent
dfda5730
PO询价bug修复
Showing
3 changed files
with
7 additions
and
16 deletions
Show diff stats
src/main/java/com/essa/pageObject/HomePage.java
| ... | ... | @@ -122,7 +122,7 @@ public class HomePage extends BasePage{ |
| 122 | 122 | WebElement inquiryManage; |
| 123 | 123 | |
| 124 | 124 | //成品询价任务列表 |
| 125 | - @FindBy (xpath = "//*[text()='成品询价任务列表']") | |
| 125 | + @FindBy (xpath = "//a[contains(text(),'成品询价任务列表')]") | |
| 126 | 126 | WebElement productInquiryTask; |
| 127 | 127 | |
| 128 | 128 | //产品开发 |
| ... | ... | @@ -343,7 +343,7 @@ public class HomePage extends BasePage{ |
| 343 | 343 | */ |
| 344 | 344 | public ProductInquiryTaskPage toProductInquiryTask() { |
| 345 | 345 | click(inquiryManage); |
| 346 | - jsExecutorClick(productInquiryTask); | |
| 346 | + click(productInquiryTask); | |
| 347 | 347 | return new ProductInquiryTaskPage(driver); |
| 348 | 348 | } |
| 349 | 349 | ... | ... |
src/main/java/com/essa/pageObject/inquiryManage/ProductInquiryFeedbackPage.java
| ... | ... | @@ -60,19 +60,12 @@ public class ProductInquiryFeedbackPage extends BasePage { |
| 60 | 60 | sendKeys(searchText, Model.getSkuNo()); |
| 61 | 61 | // 根据sku编号来判断是否加载出想要的sku信息 |
| 62 | 62 | click(search); |
| 63 | -// boolean b = isVisibility(By.xpath("//*[contains(text(),'" + Model.getSkuNo() + "')]")); | |
| 64 | -// while (!b) { | |
| 65 | -// forceWait(1000); | |
| 66 | -// } | |
| 63 | + forceWait(1000); | |
| 67 | 64 | dynamicWait(By.xpath("//*[contains(text(),'" + Model.getSkuNo() + "')]")); |
| 68 | 65 | click(waitFeedback); |
| 69 | 66 | // 判断是否加载待反馈视图 |
| 70 | -// boolean b1 = isVisibility(By.xpath("//*[contains(text(),'询价要求完成时间')]")); | |
| 71 | -// while (!b1) { | |
| 72 | -// forceWait(1000); | |
| 73 | -// } | |
| 74 | 67 | dynamicWait(By.xpath("//*[contains(text(),'询价要求完成时间')]")); |
| 75 | - moveHeightScroll("100"); | |
| 68 | + moveHeightScroll("0"); | |
| 76 | 69 | click(submit); |
| 77 | 70 | return new ProductInquiryTaskPage(driver); |
| 78 | 71 | } |
| ... | ... | @@ -89,14 +82,11 @@ public class ProductInquiryFeedbackPage extends BasePage { |
| 89 | 82 | selectElement(searchType, "来源PO单/成品采购单号"); |
| 90 | 83 | sendKeys(searchText, Model.getPoNum()); |
| 91 | 84 | click(search); |
| 92 | -// while (!(isVisibility(By.xpath("//*[@id='mask' and @style='display: none;']")))) { | |
| 93 | -// forceWait(1000); | |
| 94 | -// } | |
| 95 | 85 | dynamicLoad(By.xpath("//*[@id='mask' and @style='display: none;']")); |
| 96 | - forceWait(1000); | |
| 97 | 86 | click(waitFeedback); |
| 87 | + forceWait(500); | |
| 98 | 88 | dynamicWait(By.xpath("//*[contains(text(),'询价要求完成时间')]")); |
| 99 | - moveHeightScroll("100"); | |
| 89 | + moveHeightScroll("0"); | |
| 100 | 90 | toSubmit(); |
| 101 | 91 | return new ProductInquiryTaskPage(driver); |
| 102 | 92 | } | ... | ... |
src/main/java/com/essa/testSuite/TestPOInquiry.java
| ... | ... | @@ -34,6 +34,7 @@ public class TestPOInquiry extends BaseTest { |
| 34 | 34 | public void POInquiry() { |
| 35 | 35 | this.driver = getDriver(); |
| 36 | 36 | HomePage homePage = PageFactory.initElements(driver, HomePage.class); |
| 37 | + homePage.getHome(); | |
| 37 | 38 | homePage.toProductInquiryTask(); |
| 38 | 39 | ProductInquiryTaskPage productInquiryTask = PageFactory.initElements(driver, ProductInquiryTaskPage.class); |
| 39 | 40 | ProductInquiryFeedbackPage productInquiryFeedbackPage = PageFactory.initElements(driver, | ... | ... |