class TestTrade: def setup(self): self.trade = APP().goto_main().goto_trade() def test_create_account(self): self.trade.create_a_stack_account("12345678910") def teardown(self): self.trade.quit()
class TestLoginPage: def setup(self): self.login = APP().goto_main().goto_profile().goto_login() def test_login_by_passwd(self): login = self.login.login_by_passwd('asdfafsdfa', 'safsdjfoasjdofa') assert '错误' in login.login_msg def teardown(self): self.login.quit()
class TestMain: def setup(self): self.main = APP().goto_main() def test_search(self): stacks = self.main.goto_search().search('茅台') stack_price = stacks.get_stack_price('SH600519') assert stack_price > 2000 def teardown(self): self.main.quit()
class TestSearch: def setup(self): self.search = APP().goto_main().goto_search() # def test_add_stack(self): # self.search.search('京东') # self.search.add_stack('JD') # assert '已添加' in self.search.get_add_msg('JD') # @pytest.mark.parametrize('keyword, stack', data) # def test_add_stack(self, keyword, stack): # self.search.search(keyword) # self.search.add_stack(stack) # assert '已添加' in self.search.get_add_msg(stack) def teardown(self): self.search.quit()
def setup(self): self.login = APP().goto_main().goto_profile().goto_login()
def setup(self): self.main = APP().goto_main()
def setup(self): self.trade = APP().goto_main().goto_trade()
def setup(self): self.search = APP().goto_main().goto_search()