Blame view

src/main/java/com/essa/pageObject/StorageManage/NoticeReceivePage.java 2.09 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
49
50
51
52
53
54
55
56
57
  package com.essa.pageObject.StorageManage;
  
  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;
  
  /**
   * @author Administrator
   *收货通知页面
   */
  public class NoticeReceivePage extends BasePage {
  
  	public NoticeReceivePage(WebDriver driver) {
  		super(driver);
  	}
  	/*
  	 * 元素定位
  	 */
  	
  	@FindBy (xpath = "//input[@name='keyword']")
  	WebElement keyword;//关键字查询
  	
  	@FindBy (xpath = "//button[contains(@ng-click,'search')]")
  	WebElement search;//查询按钮
  	
  	@FindBy (xpath = "//td[@data-title=\"'PO装柜仓库'\"]//span[@class='ng-scope'][contains(text(),'设置')]")
  	WebElement set;//PO装柜仓库的“设置”
  	
  	@FindBy (xpath = "//*[@ng-click='chooseWarehouse(warehouse)']/../li[1]")
  	WebElement wareHouse;//仓库
  	
  	@FindBy (xpath = "//*[@ng-click='chooseZone(zone)']/../li[1]")
  	WebElement zone;//区位
  	
  	@FindBy (xpath = "//*[@ng-click='chooseShelf(shelf)']/../li[1]")
  	WebElement shelf;//货区
  	
  	@FindBy (xpath = "//button[contains(text(),'确定')]")
  	WebElement confirm;//确定
  	
  	@FindBy (xpath ="//button[@data-bb-handler='confirm']")
  	WebElement sysch;//是否同步提示框的确定按钮
  	
  	@FindBy (xpath ="//button[@data-bb-handler='ok']")
  	WebElement succeed;//设置成功的确定按钮
  	
  	/*
  	 * 页面方法
  	 */
  	
  	/**
  	 * 设置装柜仓库
  	 */
0b640e79   zengjin   修改设置装柜的返回值
58
  	public NoticeReceivePage setWareHouse() {
27d9a429   suweicheng   开发梳理;
59
60
61
62
63
64
  		dynamicWait(By.xpath("//div[@style='display: none;' and @id='mask']"));
  		sendKeys(keyword, Model.getPoNum());
  		click(search);
  		dynamicWait(By.xpath("//div[@style='display: none;' and @id='mask']"));
  		click(set);
  		forceWait(500);
d7f15c1c   zengjin   提交并且覆盖之前的
65
66
67
68
69
70
71
72
73
  		jsExecutorClick(wareHouse);
  		jsExecutorClick(zone);
  		jsExecutorClick(shelf);
  //		click(wareHouse);
  //		forceWait(1000);
  //		click(zone);
  //		forceWait(1000);
  //		click(shelf);
  //		forceWait(1000);
27d9a429   suweicheng   开发梳理;
74
75
76
77
  		click(confirm);
  		forceWait(1000);
  		click(sysch);
  		forceWait(1000);
0b640e79   zengjin   修改设置装柜的返回值
78
  		isVisibility(By.xpath("//*[text()='设置成功']"));
27d9a429   suweicheng   开发梳理;
79
  		click(succeed);
0b640e79   zengjin   修改设置装柜的返回值
80
  		return new NoticeReceivePage(driver);
27d9a429   suweicheng   开发梳理;
81
82
83
  	}
  
  }