Blame view

src/test/java/com/essa/pageObject/PODocumentary/ConvertTailPage.java 1.17 KB
c3910777   Administrator   by zengjin10-25
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
  package com.essa.pageObject.PODocumentary;

  

  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 ConvertTailPage extends BasePage {

  

  	public ConvertTailPage(WebDriver driver) {

  		super(driver);

  	}

  	/*

  	 * 元素定位

  	 */

  	@FindBy (xpath = "//*[@name='tailDeliveryDay']")

  	WebElement tailDeliveryDay;//尾货货期

  	

  	@FindBy (xpath ="//*[@name='moveOutQuantity']")

  	WebElement moveOutQuantity;//转出箱数

  	

  	@FindBy (xpath ="//button[text()='保存']")

  	WebElement save;//保存

  	

  	@FindBy (xpath ="//button[text()='确定']")

  	WebElement confirm;//保存

  	

  	/*

  	 * 页面方法

  	 */

  	/**

  	 * sku转在途尾货

  	 * @return PO单看板页面

  	 */

  	public POBoardPage convertTail() {

  		dynamicWait(By.xpath("//*[@name='tailDeliveryDay']"));

  		sendKeys(tailDeliveryDay, "7");

  		sendKeys(moveOutQuantity, "2");

  		click(save);

  		dynamicWait(By.xpath("//button[text()='确定']"));

  		click(confirm);

  		return new POBoardPage(driver);

  	}

  }