test_purchase_tickets.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:selenium-docker-allure 作者: eliranshani 项目源码 文件源码
def test_find_flights(driver, open_blazedemo, from_port, to_port):

    # Find flight
    choose_departure_flight(driver, departure_flight=from_port)
    choose_arrival_flight(driver, arrival_flight=to_port)
    submit_form(driver)

    assert from_port in utils.get_text(driver, By.TAG_NAME, "h3")
    assert to_port in utils.get_text(driver, By.TAG_NAME, "h3")
    assert "reserve.php" in driver.current_url

    # Choose flight
    submit_form(driver)

    assert from_port in utils.get_text(driver, By.TAG_NAME, "h2")
    assert to_port in utils.get_text(driver, By.TAG_NAME, "h2")
    assert "purchase.php" in driver.current_url

    # Purchase flight
    submit_form(driver)

    assert "Thank you for your purchase today!" in utils.get_text(driver, By.TAG_NAME, "h1")
    assert "confirmation.php" in driver.current_url
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号