Exemplo n.º 1
0
    def test_login_out_demo(self):
        u'''Test Logout BWM APP.'''
        print('1. 输入Pin码.')
        loginPage = LoginPage(self.driver)

        for value in [1, 2, 3, 4]:
            loginPage.input_pin_code(value)

        print('2. 点击更多.')
        mainPage = MainPage(self.driver)
        mainPage.click_bottom_button_by_name('更多')
    def test_more_option(self):
        u'''Test Logout BWM APP.'''
        print('1. 输入Pin码.')
        loginPage = LoginPage(self.driver)

        for value in [1, 2, 3, 4]:
            loginPage.input_pin_code(value)

        print('2. 点击更多.')
        mainPage = MainPage(self.driver)
        mainPage.click_bottom_button_by_name('更多')
        self.assertIsNotNone(None)
Exemplo n.º 3
0
    def test_choose_destination(self):
        u'''Test Go To A Destination'''
        print('1. 输入Pin码.')
        loginPage = LoginPage(self.driver)
        # pool = ThreadPool(4)
        # pool.map(loginPage.input_pin_code, [1, 2, 3, 4])
        # pool.close()
        # pool.join()
        # map(loginPage.input_pin_code, [1, 2, 3, 4])

        for value in [1, 2, 3, 4]:
            loginPage.input_pin_code(value)
        # loginPage.input_pin_password(1, 2, 3, 4)


        print('2. 点击目的地.')
        mainPage = MainPage(self.driver)
        # mainPage.click_bottom_button_by_name('车辆')
        # self.assertEqual(mainPage.get_attribute())
        mainPage.click_bottom_button_by_name('目的地')

        print('2. 点击想要去哪里.')
        destinationPage = DestinationPage(self.driver)
        destinationPage.click_search_box()

        print('3. 点击加油站.')
        destinationPage.click_destination_by_name('加油站')

        print('4. 随机选择加油站')
        destinationPage.select_result_by_name()

        print('5. 出发')
        destinationPage.click_start_trip_button()

        print('6. 跳转到活动页面')
        mainPage.click_bottom_button_by_name('活动')

        print('7.关闭active活动行程')
        activityPage = ActivityPage(self.driver)

        self.assertEqual(activityPage.get_attribute(activityPage.connect_to_usb_prompt, 'value'), '连接车辆,开始导航。')
        activityPage.click_toggle_trip_button()
    def test_more_option(self):
        u'''Test Logout BWM APP.'''
        print('1. 输入Pin码.')
        loginPage = LoginPage(self.driver)

        for value in [1, 2, 3, 4]:
            loginPage.input_pin_code(value)

        print('2. 点击更多.')
        mainPage = MainPage(self.driver)
        mainPage.click_bottom_button_by_name('更多')

        print('3. 点击个人资料')
        morePage = MorePage(self.driver)
        morePage.click_button_by_name('个人资料')

        print('4. 点击注销按钮')
        morePage.click_logout_button()

        print('5. 确认注销')
        self.assertEqual(morePage.get_title_label(), '是否确定要注销?')
        morePage.is_logout_click()