Blame view

src/main/java/com/essa/pageObject/StorageManage/LoadContainerManagePage.java 1.44 KB
0e4d02cb   toby5221   增加装柜任务形成现存尾货
1
2
3
4
5
  package com.essa.pageObject.StorageManage;
  
  import com.essa.framework.BasePage;
  import com.essa.framework.Model;
  import net.bytebuddy.asm.Advice;
d7f15c1c   zengjin   提交并且覆盖之前的
6
  import org.openqa.selenium.By;
0e4d02cb   toby5221   增加装柜任务形成现存尾货
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
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.support.FindBy;
  
  public class LoadContainerManagePage extends BasePage {
  
      public LoadContainerManagePage(WebDriver driver) {
          super(driver);
      }
  
      /**
       * 元素定位
       */
  
      // 关键字搜索输入框
      @FindBy(xpath = "//input[@placeholder='请输入PO单号或采购商编号,多个请用空格隔开']")
      WebElement inputKeySearch;
  
      // 放大镜搜索按钮
      @FindBy(xpath = "//*[@class='iconfont icon-search']")
      WebElement keySearch;
  
      // 选中查询的第一条数据
      @FindBy (xpath = "//td[@title='待处理']")
      WebElement firstPO;
  
      // 处理
      @FindBy(xpath = "//*[text()='处理']")
      WebElement handle;
  
      /**
       * 页面方法
       *
       * @return
       */
      public LoadContainerManagePage toLoadContainerDetail() {
d7f15c1c   zengjin   提交并且覆盖之前的
43
44
          forceWait(1000);
          dynamicLoad(By.xpath("//div[@style='display: none;' and @id='mask']"));
0e4d02cb   toby5221   增加装柜任务形成现存尾货
45
          sendKeys(inputKeySearch, Model.getPoNum());
d7f15c1c   zengjin   提交并且覆盖之前的
46
  //        forceWait(5000);
0e4d02cb   toby5221   增加装柜任务形成现存尾货
47
          click(keySearch);
d7f15c1c   zengjin   提交并且覆盖之前的
48
49
  //        forceWait(2000);
          dynamicLoad();
0e4d02cb   toby5221   增加装柜任务形成现存尾货
50
          click(firstPO);
d7f15c1c   zengjin   提交并且覆盖之前的
51
  //        forceWait(2000);
0e4d02cb   toby5221   增加装柜任务形成现存尾货
52
53
54
55
          click(handle);
          return new LoadContainerManagePage(driver);
      }
  }