예제 #1
0
class TestSearch:
    def setup(self):
        self.xueqiu=XueqiuPage()

    def test_search_us(self):
        assert self.xueqiu.goto_search().search("alibaba").select(0).get_price("BABA") > 170

    def test_search_us_other(self):
        assert "阿里" in self.xueqiu.goto_search().search("alibaba").select(-1).get_name()
예제 #2
0
class TestTrade:
    def setup(self):
        self.xueqiu = XueqiuPage()
        # self.trade = self.xueqiu.goto_trade()
        # self.trade.goto_hs()

    def teardown(self):
        self.xueqiu.quit()

    def test_a_open(self):
        # self.trade.a_open("18911773181", "1234")
        self.xueqiu.goto_trade().goto_hs()
예제 #3
0
class TestProfile:
    def setup(self):
        self.xueqiu = XueqiuPage()

    # 用户名错误

    def test_login_wrong_phone(self):
        assert "用户名或密码错误" in self.xueqiu.goto_profile().phone_login().phone_password().import_phone_and_password(
            "18292045414", "aiba1234").login_click()

    # 密码错误

    def test_login_wrong_password(self):
        assert "用户名或密码错误" in self.xueqiu.goto_profile().phone_login().phone_password().import_phone_and_password(
            "18292045410", "aiba1234").login_click()
예제 #4
0
class TestSearch:

    def setup(self):
        self.xueqiu = XueqiuPage()

    def test_search_alibaba(self):
        assert 180 < self.xueqiu.goto_search().search("alibaba").select(0).get_price("BABA")
예제 #5
0
class TestTrade:
    def setup_class(self):
        self.xueqiu = XueqiuPage()
        self.trade = self.xueqiu.goto_trade()
        self.trade.goto_hs()

    def test_a_open(self):

        self.trade.a_open("15901273160", '1234')
예제 #6
0
class TestTrade:
    def setup_class(self):
        self.xueqiu=XueqiuPage()
        self.trade = self.xueqiu.goto_trade()
        self.trade.goto_danjuan()
    def test_a_open(self):
        self.trade.a_open("15600534760", '1234')


    def test_danjuan_open(self):
        self.trade.danjuan_open()
예제 #7
0
class TestProfile:
    def setup(self):
        self.xueqiu = XueqiuPage()
        self.profile = self.xueqiu.goto_profile()

    def test_login_by_phone(self):
        source = self.profile.login_by_phone("15600534761", "1234").get_msg()
        print(source)
        assert '验证码已过期' in source

    def test_login_by_wechat(self):
        self.profile.login_by_wechat()
        print(self.profile.get_toast())
        assert "请先安装微信" in self.profile.get_toast()

    def test_login_by_weibo(self):
        self.fail()

    def test_login_by_qq(self):
        self.fail()
예제 #8
0
class TestProfile():
    def setup(self):
        self.xueqiu = XueqiuPage()
        self.profile = self.xueqiu.goto_profile()

    #手机登录
    def test_login_by_phone(self):
        assert "验证码已过期" in self.profile.login_by_phone("15901273161",
                                                       "1234").get_tips()

    #微信登录
    def test_login_by_wechat(self):
        self.profile.login_by_wechat()
        assert "请先安装微信" in self.profile.get_toast()

    #微博登录
    def test_login_by_weigo(self):
        self.fail()

    #QQ登录
    def test_login_by_qq(self):
        self.fail()
예제 #9
0
 def setup(self):
     self.xueqiu = XueqiuPage()
예제 #10
0
 def setup(self):
     self.xueqiu = XueqiuPage()
     self.profile = self.xueqiu.goto_profile()
예제 #11
0
class TestAds:
    def setup(self):
        self.xueqiu = XueqiuPage()

    def test_ads(self):
        assert self.xueqiu.get_ads() == True
예제 #12
0
 def setup_class(self):
     self.xueqiu = XueqiuPage()
     self.trade = self.xueqiu.goto_trade()
     self.trade.goto_hs()
예제 #13
0
 def setup_class(self):
     self.xueqiu = XueqiuPage()