TestNoticeReceiveAndLoad.java
1.88 KB
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
package com.essa.testSuite;
import com.essa.pageObject.BaseTest;
import com.essa.pageObject.HomePage;
import com.essa.pageObject.DocumentaryManage.POBoardPage;
import com.essa.pageObject.DocumentaryManage.PODocumentaryListPage;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.PageFactory;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.testng.asserts.SoftAssert;
public class TestNoticeReceiveAndLoad extends BaseTest{
WebDriver driver;
@BeforeClass
public void setUp(){
initsetUp();
loginValid("chenyijie");
}
@AfterClass
public void tearDown(){
driver.quit();
}
/**
* 通知收货、装柜
*/
@Test(description = "通知收货、装柜")
public void NoticeReceiveAndLoad(){
this.driver = getDriver();
HomePage homePage = PageFactory.initElements(driver,HomePage.class);
homePage.toPoDocumentaryListPage();
PODocumentaryListPage poDocumentaryListPage = PageFactory.initElements(driver,PODocumentaryListPage.class);
POBoardPage poBoardPage = PageFactory.initElements(driver,POBoardPage.class);
poDocumentaryListPage.toPoFollowDetail();
//通知收货
poBoardPage.noticeReceive();
//断言:通知收货是否成功
boolean actualReceive = poBoardPage.isNoticeReceSucceed();
SoftAssert softAssert = new SoftAssert();
softAssert.assertEquals(actualReceive,true,"通知收货失败!");
softAssert.assertAll();
//通知装柜
poBoardPage.noticeLoad();
//断言:通知收货是否成功
boolean actualLoae = poBoardPage.isNoticeReceSucceed();
SoftAssert anAssert = new SoftAssert();
anAssert.assertEquals(actualLoae,true,"通知装柜失败!");
anAssert.assertAll();
}
}