TsetNoticeReceipt.java
1.72 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
package com.essa.testSuite;
import com.essa.pageObject.BaseTest;
import com.essa.pageObject.PODocumentary.POBoardPage;
import com.essa.pageObject.PODocumentary.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;
import java.io.IOException;
/**
* @author Administrator
*测试用例:通知收货
*/
public class TsetNoticeReceipt extends BaseTest {
WebDriver driver;
@BeforeClass
public void setUp() throws IOException{
initsetUp();
loginValid("chenyijie");
}
@AfterClass
public void tearDown() { driver.quit(); }
/**
* 操作
*
* @throws InterruptedException
*/
@Test(description="查找PO单")
public void TsetNoticeReceipt(){
this.driver = getDriver();
PODocumentaryListPage poDocumentaryListPage = PageFactory.initElements(driver,PODocumentaryListPage.class);
POBoardPage poBoardPage = PageFactory.initElements(driver,POBoardPage.class);
poDocumentaryListPage.toPoDocumentaryListPage();
poBoardPage.toNoticeReceipt();
//通知收货是否成功
boolean actualReceipt = poBoardPage.isNoticeReceipt();
SoftAssert ftAssert =new SoftAssert();
ftAssert.assertEquals(actualReceipt,true,"通知收货失败");
poBoardPage.toNotificationLoading();
//通知装柜是否成功
boolean actualLoading = poBoardPage.isNotificationLoading();
SoftAssert softAssert =new SoftAssert();
softAssert.assertEquals(actualLoading,true,"通知装柜失败");
}
}