Blame view

src/main/java/com/buyer/testSuite/TestConfirmBuy.java 1.02 KB
27d9a429   suweicheng   开发梳理;
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
  package com.buyer.testSuite;
  
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.support.PageFactory;
  import org.testng.annotations.AfterClass;
  import org.testng.annotations.BeforeTest;
  import org.testng.annotations.Test;
  
  import com.buyer.pageObject.IndexPage;
  import com.buyer.pageObject.ShoppingCartPage;
  import com.essa.framework.Model;
  import com.essa.pageObject.BaseTest;
  
  public class TestConfirmBuy extends BaseTest {
  
  	WebDriver driver;
  	
  	@BeforeTest
  	public void setUp() {
  		initBuyer();
  		loginBuyerValid(Model.getBuyerAccount(),Model.getBuyerPassword());
  	}
  	
  	@AfterClass
  	public void tearDown() {
  		driver.quit();
  	}
  	
  	/**
  	 * 登录采购商账号,确认订单
  	 */
  	@Test(description="采购商确认采购")
  	public void confirmBuy() {
  		this.driver = getDriver();
  		IndexPage indexPage = PageFactory.initElements(driver, IndexPage.class);
  		indexPage.toShoppingCartPage();
  		ShoppingCartPage shoppingCartPage = PageFactory.initElements(driver, ShoppingCartPage.class);
  		shoppingCartPage.confirmOrder();
  	}
  }