Пример #1
0
 def test_MRYX_ST_usr_003(self):
     sleep(2)
     mp = MysPage(self.driver)
     mp.to_up(2000)
     sleep(2)
     mp.click_shipping_address()  # 点击收货地址
     mss = MysShippingAddressPage(self.driver)
     mss.click_new_add_shipping_address()  #点击新增地址
     mssn = MysShippingAddressNewAddShippingAddressPage(self.driver)
     sleep(2)
     mssn.send_receiver(self.receiver)  # 输入收货人名
     sleep(2)
     mssn.click_sex(self.sex)  # 点击性别
     sleep(2)
     mssn.send_cellphone_number(self.phone)  # 输入手机号码
     sleep(2)
     mssn.click_shopping_address()  # 点击收货地址输入框
     ap = AddressPage(self.driver)
     sleep(2)
     ap.send_search_address_input(self.address)  # 输入地址信息
     ap.click_search_address_show_dfgc()  # 点击显示为成都锦江区229号的结果
     sleep(2)
     mssn.send_building_number(self.building_number)
     sleep(2)
     mssn.click_school_lable()  # 点击学校标签
     mssn.click_Save_the_shipping_address()  #点击保存收货地址
Пример #2
0
 def test_MRYX_ST_usr_004(self):
     """这是MRYX_ST_usr_004这一条测试用例"""
     mp = MysPage(self.driver)
     mp.to_up()
     mp.click_customer_service()
     sleep(2)
     mcsp = MysCustomerServicePage(self.driver)
     mcsp.click_tv_question_3()  # 点击第三个问题
     text = mcsp.text_tv_answer_3()  # 获取第三个问题的解答
     self.assertIn(self.asserts, text)  # 断言文本是否属于text文本中
Пример #3
0
 def test_MRYX_ST_usr_010(self):
     """助力免费拿测试用例MRYX_ST_usr_010"""
     sleep(2)
     mp = MysPage(self.driver)
     mp.to_up()  # 向上滑动
     sleep(5)
     mp.click_help_get_free()  # 点击助力免费拿
     mhgfp = MysHelpGetFreePage(self.driver)
     mhgfp.to_up()  # 向上滑动
     sleep(5)
     mhgfp.click_help_get_free_good_no(5)  # 点击第五个免费助力拿商品
     sleep(3)
     self.assertTrue(mhgfp.if_have_ticket_text())  # 断言元素是否存在