Beispiel #1
0
 def register(self):
     try:
         self.wait_activity(".MainActivity", 30)
         name_value = ReadExcel("register.xlsx", "Sheet1").read_excel(1, 0)
         id_card_value = int(
             ReadExcel("register.xlsx", "Sheet1").read_excel(1, 1))
         self.name_text(name_value)
         self.id_card_text(id_card_value)
         self.next_btn()
         return "注册成功"
     except:
         print("注册失败")
Beispiel #2
0
 def new_shop(self):
     try:
         self.wait_activity(".MainActivity", 30)
         self.mine()
         self.shop_management()
         self.new_shop_btn()
         read_excel = ReadExcel("new_shop.xlsx", "Sheet1")
         shop_name_Value = read_excel.read_excel(1, 0)
         self.shop_name(shop_name_Value)
         self.confirm_button()
         return "新建门店成功"
     except:
         print("新建门店失败")
Beispiel #3
0
 def login(self):
     try:
         self.wait_activity(".MainActivity", 30)
         mobileValue = int(ReadExcel("Login.xlsx", "Sheet1").read_excel(1, 0))
         codeValue = int(ReadExcel("Login.xlsx", "Sheet1").read_excel(2, 0))
         # print(mobileValue)
         # print(codeValue)
         self.mobile_set_text(mobileValue)
         self.code_set_text(codeValue)
         self.login_button()
     except:
         print("登录失败")
         self.get_screeShot()
Beispiel #4
0
 def new_room(self):
     try:
         self.new_room_btn()
         room_type_Value = ReadExcel("new_room.xlsx", "Sheet1").read_excel(1, 0)
         room_name = ReadExcel("new_room.xlsx", "Sheet1").read_excel(1, 1)
         room_description = ReadExcel("new_room.xlsx", "Sheet1").read_excel(1, 2)
         self.room_type(room_type_Value)
         self.room_name(room_name)
         self.room_description(room_description)
         self.confirm_button()
         return "新建房源成功"
     except:
         print("新建房源失败")
Beispiel #5
0
 def new_order(self):
     try:
         tenant_name_value = ReadExcel("new_order.xlsx", "Sheet1").read_excel(1, 0)
         tenant_mobile_value = ReadExcel("new_order.xlsx", "Sheet1").read_excel(1, 1)
         self.oder_management()
         self.click_new_order()
         # self.choose_room()
         # self.checkin_time()
         # self.checkout_time()
         self.tenant_name(tenant_name_value)
         self.tenant_mobile(tenant_mobile_value)
         self.confirm_button()
         return "新建订单成功"
     except:
         print("新建订单失败")
         self.get_screeShot()
 def temporary_authorization_process(self):
     try:
         # YunLock_new_order = NewOderPage(self.driver)
         # YunLock_new_order.choose_shop()
         self.temporary_authorization_btn()
         self.add_authorization_btn()
         self.checkin_time()
         self.checkout_time()
         authorized_name_value = ReadExcel("temporary_authorization.xlsx", "Sheet1").read_excel(1, 0)
         self.authorized_name_input_box(authorized_name_value)
         authorized_mobile_value = ReadExcel("temporary_authorization.xlsx", "Sheet1").read_excel(1, 1)
         self.authorized_mobile_input_box(authorized_mobile_value)
         self.authorized_identity_btn()
         self.confirm_btn()
         return "临时授权成功"
     except:
         print("临时授权失败")
 def artificial_authentication_Process(self):
     try:
         NewOder = NewOderPage(self.driver)
         NewOder.oder_management()
         # NewOder.choose_shop()
         self.all_order_btn()
         self.order_list()
         self.artificial_authentication_btn()
         # self.choose_ethnic_btn()
         id_number_value = ReadExcel("artificial_authentication.xlsx", "Sheet1").read_excel(1, 0)
         address_value = ReadExcel("artificial_authentication.xlsx", "Sheet1").read_excel(1, 1)
         print(id_number_value)
         print(address_value)
         self.id_number_input_box(id_number_value)
         self.address_input_box(address_value)
         self.confirm_btn()
         return "人工认证成功"
     except:
         print("人工认证失败")
Beispiel #8
0
from public.po.login_page import LoginPage
from public.common.do_excel import ReadExcel
from public.common.desired_caps import desired

mobileValue = int(ReadExcel("Login.xlsx", "Sheet1").read_excel(1, 0))


class TestLogin():
    def setUp(self):
        self.driver = desired()

    def test_login(self):
        self.login = LoginPage(self.driver)
        self.login.wait_activity(".MainActivity", 60)
        self.login.login()

    def tearDown(self):
        self.driver.close_app()
                                                "Sheet1").read_excel(1, 1)
            self.authorized_mobile_input_box(authorized_mobile_value)
            self.authorized_identity_btn()
            self.confirm_btn()
            return "临时授权成功"
        except:
            print("临时授权失败")


if __name__ == '__main__':
    driver = desired()
    App = LoginPage(driver)
    App.login()
    TA = TemporaryAuthorization(driver)
    YunLock_new_order = NewOderPage(driver)
    YunLock_new_order.choose_shop()
    TA.temporary_authorization_btn()
    TA.add_authorization_btn()
    TA.checkin_time()
    TA.confirm_btn()
    TA.checkout_time()
    TA.confirm_btn()
    authorized_name_value = ReadExcel("temporary_authorization.xlsx",
                                      "Sheet1").read_excel(1, 0)
    TA.authorized_name_input_box(authorized_name_value)
    authorized_mobile_value = ReadExcel("temporary_authorization.xlsx",
                                        "Sheet1").read_excel(1, 1)
    TA.authorized_mobile_input_box(authorized_mobile_value)
    TA.authorized_identity_btn()
    TA.confirm_btn()