Blame view

src/main/java/com/essa/pageObject/StorageManage/LoadContainerManagePage.java 1.52 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
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.support.FindBy;
3f06ee1c   zengjin   修改时间工具,还有船务相关
10
11
12
13
14
  /**
  * @Description: 装柜任务管理列表
  * @Author: ZengJin
  * @CreateTime: 2018/11/1
  */
0e4d02cb   toby5221   增加装柜任务形成现存尾货
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
  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   提交并且覆盖之前的
47
48
          forceWait(1000);
          dynamicLoad(By.xpath("//div[@style='display: none;' and @id='mask']"));
0e4d02cb   toby5221   增加装柜任务形成现存尾货
49
          sendKeys(inputKeySearch, Model.getPoNum());
d7f15c1c   zengjin   提交并且覆盖之前的
50
  //        forceWait(5000);
0e4d02cb   toby5221   增加装柜任务形成现存尾货
51
          click(keySearch);
d7f15c1c   zengjin   提交并且覆盖之前的
52
53
  //        forceWait(2000);
          dynamicLoad();
0e4d02cb   toby5221   增加装柜任务形成现存尾货
54
          click(firstPO);
d7f15c1c   zengjin   提交并且覆盖之前的
55
  //        forceWait(2000);
0e4d02cb   toby5221   增加装柜任务形成现存尾货
56
57
58
59
          click(handle);
          return new LoadContainerManagePage(driver);
      }
  }