basic-auto-test/test_case/test_demo_ui.py

30 lines
865 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
# -------------------------------
# @文件test_demo_ui.py
# @时间2024/4/12 下午4:15
# @作者caiweichao
# @功能描述ui自动化 demo
# -------------------------------
import time
from page_object.page_baidu_demo import PageBaidu
import pytest
import allure
# @pytest.mark.usefixtures('login_class')
@allure.feature('访问百度demo')
class TestDemo:
def test_baidu_demo1(self,login_fixture):
PageBaidu(login_fixture).get_baidu()
PageBaidu(login_fixture).input_keyword(keyword="gitee")
PageBaidu(login_fixture).click_baidu_button()
time.sleep(30)
def test_baidu_demo2(self, login_fixture):
PageBaidu(login_fixture).get_baidu()
PageBaidu(login_fixture).input_keyword(keyword="github")
PageBaidu(login_fixture).click_baidu_button()
time.sleep(3)