Commit 44b1a88ae614e79895382d5b0b2ba9e9298d49c2
1 parent
359c1bd9
needDealtApplyPage
Showing
1 changed file
with
106 additions
and
0 deletions
Show diff stats
src/test/java/com/essa/pageObject/needDealt/NeedDealtApplyPage.java
0 → 100644
| ... | ... | @@ -0,0 +1,106 @@ |
| 1 | +package com.essa.pageObject.needDealt; | |
| 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 | +import com.essa.pageObject.HomePage; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 当团购活动成功时,类目经理采购计划单申请页面 | |
| 14 | + * @author Administrator | |
| 15 | + * | |
| 16 | + */ | |
| 17 | +public class NeedDealtApplyPage extends BasePage { | |
| 18 | + | |
| 19 | + public NeedDealtApplyPage(WebDriver driver) { | |
| 20 | + super(driver); | |
| 21 | + } | |
| 22 | + | |
| 23 | + /* | |
| 24 | + * 元素定位 | |
| 25 | + */ | |
| 26 | + | |
| 27 | + //提交询价 | |
| 28 | + @FindBy (xpath ="//*[text()='提交询价']") | |
| 29 | + WebElement submitInquiry; | |
| 30 | + | |
| 31 | + //待办工作--检查点 | |
| 32 | + @FindBy (xpath = "//*[contains(text(),'待办工作')]") | |
| 33 | + WebElement checkpoint; | |
| 34 | + | |
| 35 | + //流水号 | |
| 36 | + @FindBy (xpath = "//*[contains(text(),'流水号:RW')]") | |
| 37 | + WebElement serialNumber; | |
| 38 | + | |
| 39 | + //确认 | |
| 40 | + @FindBy (xpath = "//*[text()='确认']") | |
| 41 | + WebElement confirm; | |
| 42 | + | |
| 43 | + //送审核 | |
| 44 | + @FindBy (xpath = "//*[text()='提交审核']") | |
| 45 | + WebElement toAudit; | |
| 46 | + | |
| 47 | + //认领 | |
| 48 | + @FindBy (xpath = "//*[text()='认领']") | |
| 49 | + WebElement claim; | |
| 50 | + | |
| 51 | + //同意 | |
| 52 | + @FindBy (xpath ="//*[text()='同意']") | |
| 53 | + WebElement agree; | |
| 54 | + | |
| 55 | + /* | |
| 56 | + * 页面方法 | |
| 57 | + */ | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 提交询价 | |
| 61 | + * @return bmps首页 | |
| 62 | + */ | |
| 63 | + public HomePage submitInquiry() { | |
| 64 | + mywait(checkpoint); | |
| 65 | + forceWait(1000); | |
| 66 | + Model.setSerialNum(partialStr(serialNumber.getText(), "流水号:")); | |
| 67 | + moveHeightScroll("100"); | |
| 68 | + click(submitInquiry); | |
| 69 | + forceWait(500); | |
| 70 | + click(confirm); | |
| 71 | + dynamicLoad(By.xpath("//*[style='display: block;']")); | |
| 72 | + return new HomePage(driver); | |
| 73 | + } | |
| 74 | + | |
| 75 | + /** | |
| 76 | + * 类目经理修订,送审核 | |
| 77 | + * @return bpms首页 | |
| 78 | + */ | |
| 79 | + public HomePage toAudit() { | |
| 80 | + mywait(checkpoint); | |
| 81 | + forceWait(1000); | |
| 82 | + moveHeightScroll("100"); | |
| 83 | + click(toAudit); | |
| 84 | + forceWait(500); | |
| 85 | + click(confirm); | |
| 86 | + dynamicLoad(By.xpath("//*[style='display: block;']")); | |
| 87 | + return new HomePage(driver); | |
| 88 | + } | |
| 89 | + | |
| 90 | + /** | |
| 91 | + * 财务审核计划申请 | |
| 92 | + * @return | |
| 93 | + */ | |
| 94 | + public HomePage audit() { | |
| 95 | + mywait(checkpoint); | |
| 96 | + forceWait(1000); | |
| 97 | + moveHeightScroll("100"); | |
| 98 | + click(claim); | |
| 99 | + mywait(checkpoint); | |
| 100 | + moveHeightScroll("100"); | |
| 101 | + click(agree); | |
| 102 | + click(confirm); | |
| 103 | + dynamicLoad(By.xpath("//*[style='display: block;']")); | |
| 104 | + return new HomePage(driver); | |
| 105 | + } | |
| 106 | +} | ... | ... |