Blame view

src/test/java/com/buyer/pageObject/OrderPreviewPage.java 1.13 KB
c98c375e   Administrator   all
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
  package com.buyer.pageObject;

  

  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;

  

  /**

   * @author Administrator

   *订单预览页

   */

  public class OrderPreviewPage extends BasePage {

  	public OrderPreviewPage(WebDriver driver) {

  		super(driver);

  	}

  	

  	//是否授权:同意

  	@FindBy (xpath ="//*[@ng-checked='list.isAuthorExchange==1']")

  	WebElement agree;

  	

  	//提交po

  	@FindBy (xpath ="//*[@id='react-orderConfirmation-submit']")

  	WebElement sendPO;

  	

  	//弹框:确认

  	@FindBy (xpath ="//a[text()='Send PO']")

  	WebElement confirm;

  	

  	/**

  	 * 提交po

  	 * @return PayDepositPage

  	 */

  	public PayDepositPage submit() {

a62053f7   Administrator   add scene
36
37
38
39
  //		while(!(isVisibility(By.xpath("//*[@ng-checked='list.isAuthorExchange==1']")))) {

  //			forceWait(1000);

  //		}

  		dynamicWait(By.xpath("//*[@ng-checked='list.isAuthorExchange==1']"));

c98c375e   Administrator   all
40
41
42
43
44
45
46
47
48
  		moveHeightScroll("50");

  		forceWait(500);

  		jsExecutorClick(agree);

  		click(sendPO);

  		forceWait(1000);

  		click(confirm);

  		return new PayDepositPage(driver);

  	}

  }