Blame view

src/main/java/com/essa/pageObject/LogisticShipp/LogisticsShippPage.java 1.78 KB
d688c3f8   hanlei   船务
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
58
59
60
61
  package com.essa.pageObject.LogisticShipp;
  
  
  import com.essa.framework.BasePage;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.support.FindBy;
  
  //船务看板-通知确认船务资料界面
  public class LogisticsShippPage extends BasePage {
      public LogisticsShippPage(WebDriver driver) {
          super(driver);
      }
  
      // 通知确认船务资料看板
      @FindBy(xpath = "//a[text()='通知确认船务资料']")
      WebElement NoticeBoard;
  
      //等待数据结构
      @FindBy(xpath = "//*[@id='tableViewList']/div/div/div/div/div/div/table/tbody/tr[1]")
      WebElement resultDate;
  
      //订单编号输入框
      @FindBy (xpath = "//input[@type='text' and @ng-model ='query.keyword']")
      WebElement setPono;
  
      //高级查询按钮
      @FindBy (xpath = "//i[@class='iconfont icon-search']")
      WebElement querySubBtn;
  
      //查询结果
      @FindBy (xpath = "//input[@type ='checkbox' and @checklist-value='item']")
      WebElement selectedpo;
  
      //点击通知确认船务资料
      @FindBy (xpath = "//button[text()='通知确认船务资料']")
      WebElement skippSubBtn;
  
      //点击确认按钮
      @FindBy (xpath = "//html/body/div[5]/div/div/div[2]/div/div/button[1]")
      WebElement submitSubBtn;
  
      //点击退出登录
      @FindBy (xpath="//*[text()='退出']")
      WebElement logout;
  
      //搜索并通知业务补充船务资料
      public LogisticsShippPage isSucceed() {
          click(NoticeBoard);
          mywait(resultDate);
          setPono.sendKeys("D180411T0278");
          click(querySubBtn);
          mywait(selectedpo);
          click(selectedpo);
          mywait(selectedpo);
          click(skippSubBtn);
          mywait(submitSubBtn);
          click(submitSubBtn);
          return new LogisticsShippPage(driver);
      }
  }