Blame view

src/test/java/com/essa/pageObject/needDealt/NeedDealtApplyPage.java 2.27 KB
44b1a88a   Administrator   needDealtApplyPage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
  package com.essa.pageObject.needDealt;

  

  import org.openqa.selenium.By;

  import org.openqa.selenium.WebDriver;

  import org.openqa.selenium.WebElement;

  import org.openqa.selenium.support.FindBy;

  

  import com.essa.framework.BasePage;

  import com.essa.framework.Model;

  import com.essa.pageObject.HomePage;

  

  /**

   * 当团购活动成功时,类目经理采购计划单申请页面

   * @author Administrator

   *

   */

  public class NeedDealtApplyPage extends BasePage {

  

  	public NeedDealtApplyPage(WebDriver driver) {

  		super(driver);

  	}

  

  	/*

  	 * 元素定位

  	 */

  	

  	//提交询价

  	@FindBy (xpath ="//*[text()='提交询价']")

  	WebElement submitInquiry;

  	

  	//待办工作--检查点

  	@FindBy (xpath = "//*[contains(text(),'待办工作')]")

  	WebElement checkpoint;

  	

  	//流水号

  	@FindBy (xpath = "//*[contains(text(),'流水号:RW')]")

  	WebElement serialNumber;

  	

  	//确认

  	@FindBy (xpath = "//*[text()='确认']")

  	WebElement confirm;

  	

  	//送审核

  	@FindBy (xpath = "//*[text()='提交审核']")

  	WebElement toAudit;

  	

  	//认领

  	@FindBy (xpath = "//*[text()='认领']")

  	WebElement claim;

  	

  	//同意

  	@FindBy (xpath ="//*[text()='同意']")

  	WebElement agree;

  	

  	/*

  	 * 页面方法

  	 */

  	

  	/**

  	 * 提交询价 

  	 * @return bmps首页

  	 */

  	public HomePage submitInquiry() {

  		mywait(checkpoint);

  		forceWait(1000);

  		Model.setSerialNum(partialStr(serialNumber.getText(), "流水号:"));

  		moveHeightScroll("100");

  		click(submitInquiry);

  		forceWait(500);

  		click(confirm);

  		dynamicLoad(By.xpath("//*[style='display: block;']"));

  		return new HomePage(driver);

  	}

  	

  	/**

  	 * 类目经理修订,送审核

  	 * @return bpms首页

  	 */

  	public HomePage toAudit() {

  		mywait(checkpoint);

  		forceWait(1000);

  		moveHeightScroll("100");

  		click(toAudit);

  		forceWait(500);

  		click(confirm);

  		dynamicLoad(By.xpath("//*[style='display: block;']"));

  		return new HomePage(driver);

  	}

  	

  	/**

  	 * 财务审核计划申请

  	 * @return

  	 */

  	public HomePage audit() {

  		mywait(checkpoint);

  		forceWait(1000);

  		moveHeightScroll("100");

  		click(claim);

  		mywait(checkpoint);

  		moveHeightScroll("100");

  		click(agree);

  		click(confirm);

  		dynamicLoad(By.xpath("//*[style='display: block;']"));

  		return new HomePage(driver);

  	}

  }