示例#1
0
    def test_02_Book_Flight(self,test_setup):
        driver.get('http://*****:*****@gmail.com')
        time.sleep(1)
        login.enterPassword('12345')
        time.sleep(1)
        login.signInClick()
        time.sleep(1)
        customer = CustomerProfilePage(driver)
        time.sleep(1)
        customer.enterDeparture('Vegas')
        time.sleep(1)
        customer.enterArrival('Bankok')
        time.sleep(1)
        customer.enterDate('12282019')
        time.sleep(1)
        customer.enterClass('Business')
        time.sleep(1)
        customer.enterAdultSeats(1)
        time.sleep(1)
        customer.enterChildrenSeats(2)
        time.sleep(1)
        customer.checkAvailabilty()
        time.sleep(2)
示例#2
0
    def test_07_Delete_Flight(self,test_setup):
        driver.get('http://*****:*****@gmail.com')
        time.sleep(1)
        login.enterPassword('1234')
        time.sleep(1)
        login.signInClick()
        time.sleep(1)
        manager=ManagerHomePage(driver)
        manager.deleteFlight()
        time.sleep(1)
        Deleteflight=DeleteFlightPage(driver)
        Deleteflight.selectFlightNo('1212D')
        time.sleep(1)
        Deleteflight.enterDate('12282019')
        time.sleep(1)
        Deleteflight.deleteFlight()
        time.sleep(2)
示例#3
0
    def test_01_login_valid(self,test_setup):
        driver.get('http://*****:*****@gmail.com')
        time.sleep(1)
        login.enterPassword('12345')
        time.sleep(1)
        login.signInClick()
        time.sleep(1)
示例#4
0
    def test_03_Add_Flight(self,test_setup):
        driver.get('http://*****:*****@gmail.com')
        time.sleep(1)
        login.enterPassword('1234')
        time.sleep(1)
        login.signInClick()
        time.sleep(1)
        manager=ManagerHomePage(driver)
        manager.addFlight()
        time.sleep(1)
        addflght=AddFlightPage(driver)
        addflght.enterFlightNo('1212D')
        time.sleep(1)
        addflght.enterDeparture('Bankok')
        time.sleep(1)
        addflght.enterArrival('Vegas')
        time.sleep(1)
        addflght.enterDate('12282019')
        time.sleep(1)
        addflght.enterTime('1227AM')
        time.sleep(1)
        addflght.enterEconomySeat(30)
        time.sleep(1)
        addflght.enterEconomyPrice(200)
        time.sleep(1)
        addflght.enterBusinessSeat(30)
        time.sleep(1)
        addflght.enterBusinessPrice(400)
        time.sleep(1)
        addflght.enterFirstSeat(20)
        time.sleep(1)
        addflght.enterFirstPrice(500)
        time.sleep(1)
        addflght.addFlight()
        time.sleep(2)
def test_func(value_A, value_B):
    global driver
    driver = webdriver.Chrome('F:\dev\chromedriver.exe')
    driver.get('http://localhost:9090/WebSE/')

    home = HomePage(driver)
    home.clickSignIn()
    page1 = driver.current_url
    login = LoginPage(driver)
    time.sleep(1)
    login.selectUserType('Customer')
    time.sleep(1)
    login.enterEmail(value_A)
    time.sleep(1)
    login.enterPassword(value_B)
    time.sleep(1)
    login.signInClick()
    time.sleep(1)
    customer = CustomerProfilePage(driver)
    customer.logout()
示例#6
0
    def test_08_Accept_Request(self,test_setup):
        driver.get('http://*****:*****@gmail.com')
        time.sleep(1)
        login.enterPassword('1234')
        time.sleep(1)
        login.signInClick()
        time.sleep(1)
        admin=AdminPage(driver)
        admin.selectApprove()
        time.sleep(1)
        admin.logout()
        time.sleep(1)