Blame view

src/main/java/com/buyer/pageObject/OrderPreviewPage.java 1.08 KB
27d9a429   suweicheng   开发梳理;
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
  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() {
  //		while(!(isVisibility(By.xpath("//*[@ng-checked='list.isAuthorExchange==1']")))) {
  //			forceWait(1000);
  //		}
  		dynamicWait(By.xpath("//*[@ng-checked='list.isAuthorExchange==1']"));
  		moveHeightScroll("50");
  		forceWait(500);
  		jsExecutorClick(agree);
  		click(sendPO);
  		forceWait(1000);
  		click(confirm);
  		return new PayDepositPage(driver);
  	}
  }