class TestQueryArticleByChannel:
    def setup_class(self):
        self.driver = DriverUtils.get_app_driver()
        self.index_proxy = IndexProxy()

    def test_query_article_by_channel(self):
        channel_name = "算法"
        self.index_proxy.test_query_article_by_channel(channel_name)
        is_suc = element_is_exist(self.driver, "text", "猜你喜欢")
        assert is_suc

    def teardown_class(self):
        DriverUtils.quit_app_driver()
Example #2
0
class TestQyAritcal:
    # 2.定义类级别初始化fixture
    def setup_class(self):
        self.driver = DriverUtils.get_app_driver()
        self.index_proxy = IndexProxy()

    # 3.定义测试方法
    def test_qy_ar_by_channel(self):
        # 组织测试数据
        channel_name = "数码产品"
        # 调用业务方法
        self.index_proxy.test_query_article_by_channel(channel_name)
        # 断言
        is_suc = element_is_exist(self.driver, "text", "猜你喜欢")
        assert is_suc