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