Blame view

src/main/java/com/essa/pageObject/StorageManage/HandlingLoadingOrders.java 2.21 KB
81a4681f   zengjin   修改时间工具,还有船务相关
1
  package com.essa.pageObject.StorageManage;
71af73f2   78@qq.com   lana update
2
3
  
  import com.essa.framework.BasePage;
81a4681f   zengjin   修改时间工具,还有船务相关
4
  import com.essa.framework.Tools;
71af73f2   78@qq.com   lana update
5
6
7
8
9
10
  import org.openqa.selenium.By;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.support.FindBy;
  
  import java.text.SimpleDateFormat;
71af73f2   78@qq.com   lana update
11
  import java.util.Date;
71af73f2   78@qq.com   lana update
12
13
14
  
  
  /**
81a4681f   zengjin   修改时间工具,还有船务相关
15
   * 装柜任务处理页面
71af73f2   78@qq.com   lana update
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
62
63
64
65
66
67
68
69
   * Created by Administrator on 2018/10/30 0030.
   */
  public class HandlingLoadingOrders extends BasePage {
      public HandlingLoadingOrders(WebDriver driver) {
          super(driver);
      }
  
      WebDriver webDriver;
      /*
  	 * 元素定位
  	 */
  
      //实际装柜日期
      @FindBy(xpath = "//input[@id='loadCompleteDate']")
      WebElement loadCompleteDate;
  
      //获取装柜商品列表
      //@FindBy(xpath ="//td[@ng-repeat='item in taskInfo.skuList']")
      //WebElement tdList;
      @FindBy(xpath = "//tbody[2]/tr[1]/td[6]")
      WebElement firstTr;//定位第一行
  
  //    //获取元素列表循环读取值
  //    public ArrayList<String> getTrtd() {
  //        String trs=testtrList.getText();
  //
  //        WebElement temp;
  //        for (int kk=0;kk<0;kk++){
  //            temp= driver.findElement(By.xpath("//tbody[2]/tr["+kk+"]/td[6]"));
  //            temp.getText();
  //
  //        }
  
  //       ArrayList arryList = new ArrayList();
  //        //arryList.set(0,trs);
  //        System.out.print(trs+"123456789---------");
  //        return arryList;
  //    }
  
      //输入实装箱数
      @FindBy(xpath = "//input[@id='actLoadBoxQuantity']")
      WebElement realNumber;
  
      //提交
      @FindBy(xpath = "//*[text()='提交']")
      WebElement submit;
  
      /**
       * 设置装柜处理参数
       */
      public HandlingLoadingOrders setHandlingCabinet() {
          dynamicLoad(By.xpath("//div[@style='display: none;' and @id='mask']"));
          //设置实际装柜日期
          jsExecutorRemoveAttribute(loadCompleteDate, "readonly");
81a4681f   zengjin   修改时间工具,还有船务相关
70
71
72
73
74
75
  //        loadCompleteDate.click();
  //        forceWait(500);
  //        SimpleDateFormat zs=new SimpleDateFormat("MM/dd/yyyy");
  //        String s =zs.format(new Date());
  //        sendKeys(loadCompleteDate,s);
          sendKeys(loadCompleteDate, Tools.getToday());
71af73f2   78@qq.com   lana update
76
          click(submit);
81a4681f   zengjin   修改时间工具,还有船务相关
77
          dynamicLoad();
71af73f2   78@qq.com   lana update
78
79
80
81
82
          return new HandlingLoadingOrders(driver);
      }
  
  
  }