Blame view

src/main/java/com/essa/testSuite/TestConfirLogistics.java 2.59 KB
687cafe9   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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  package com.essa.testSuite;
  
  import com.essa.pageObject.LogisticShipp.*;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.support.PageFactory;
  import org.testng.annotations.AfterClass;
  import org.testng.annotations.BeforeClass;
  import com.essa.pageObject.BaseTest;
  import com.essa.pageObject.HomePage;
  
  public class TestConfirLogistics extends BaseTest {
  
      WebDriver driver;
  
      @BeforeClass
      public void setUp() {
          initsetUp();
          loginValid("chenhong");
      }
  
      @AfterClass
      public void tearDown() {
          driver.quit();
      }
  
      @org.testng.annotations.Test(description = "通知确认船务资料、订车、发车")
      public void confirmLogisticsTest() {
          this.driver = getDriver();
  
          HomePage homePage = PageFactory.initElements(driver, HomePage.class);
          homePage.toLogisticsShippPage();
  
          //通知业务人员和客户,进行船务资料确认
          LogisticsShippPage logisticsShippPage = PageFactory.initElements(driver, LogisticsShippPage.class);
          logisticsShippPage.isSucceed();
  
          homePage.getHome();
          homePage.logout();
          loginValid("yanqingping");
  
          //待办
          homePage.toSailingDateConfirmPage();
          //业务员补充船务资料
          SellerFillInfoPage sellerFillInfo = PageFactory.initElements(driver, SellerFillInfoPage.class);
          sellerFillInfo.toSellerFillInfo();
  
          //登记备选船期待办
          homePage.getHome();
          homePage.logout();
          loginValid("wangmiaodan");
          homePage.toSailingDateConfirmPage();
          RegisOptShpDatePage regisOptShpDatePage = PageFactory.initElements(driver,RegisOptShpDatePage.class);
          regisOptShpDatePage.toRegisOptShpDatePage();
  
          //大跟单确认
          homePage.getHome();
          homePage.logout();
          loginValid("yuwanhang");
          homePage.toSailingDateConfirmPage();
          LargeDcofdPage largeDcofdPage = PageFactory.initElements(driver,LargeDcofdPage.class);
          largeDcofdPage.toLargeDcofdPage();
  
          //订舱
          homePage.getHome();
          homePage.logout();
          loginValid("chenhong");
  
          homePage.toLogisticsShippPage();
          CabinInfoPage cabinInfoPage = PageFactory.initElements(driver, CabinInfoPage.class);
          cabinInfoPage.toCabinInfoPage();
  
          //订车信息确认
          BookingCarPage bookingCarPage = PageFactory.initElements(driver, BookingCarPage.class);
          bookingCarPage.toBookingCarPage();
  
          //确认发车
          SendCarPage sendCarPage = PageFactory.initElements(driver, SendCarPage.class);
          sendCarPage.toSendCarPage();
  
      }
  }