예제 #1
0
 def open_settings_page(self):
     if hmi.obj_exists(Icons.SETTINGS_SOUND_BUTTON) or hmi.obj_exists(
             Icons.SETTINGS_GENERAL_BUTTON):
         logging.info("Settings page is already open")
     elif tap_if_visible(Icons.MAIN_SETTINGS_BUTTON_ACTIVE):
         logging.info('Open settings page')
     else:
         tap(Icons.MAIN_SETTINGS_BUTTON_INACTIVE)
예제 #2
0
 def tap_on_direct_tune_button(self):
     if hmi.obj_exists(Text.ENTER_TEXT) and hmi.obj_exists(
             Icons.AUDIO_DIRECT_CANCEL_BUTTON_ACTIVE):
         logging.info('Direct tune page is already open')
     elif tap_if_visible(Icons.AUDIO_DIRECT_TUNE_BUTTON):
         logging.info('Open direct tune page')
     else:
         self.open_audio_page()
         tap(Icons.AUDIO_DIRECT_TUNE_BUTTON)
예제 #3
0
 def open_language_page(self):
     if hmi.obj_exists(Text.LANGUAGE_TEXT) and hmi.obj_exists(
             Text.ESPANOL_TEXT):
         logging.info("Language settings page is already open")
     elif tap_if_visible(Text.LANGUAGE_TEXT):
         logging.info('Open language settings page')
     else:
         self.open_general_settings()
         tap(Text.LANGUAGE_TEXT)
예제 #4
0
 def open_speed_compensated_volume(self):
     if hmi.obj_exists(
             Text.SOUND_SETTINGS_SPEED_COMPENSATED_TEXT) and hmi.obj_exists(
                 Text.SPEED_COMPENSATED_VOLUME_PAGE_OFF_TEXT):
         logging.info("Speed compensated volume page is already open")
     elif tap_if_visible(Text.SOUND_SETTINGS_SPEED_COMPENSATED_TEXT):
         logging.info("Open speed compensated volume page")
     else:
         self.open_sound_settings_page()
         tap(Text.SOUND_SETTINGS_SPEED_COMPENSATED_TEXT)
예제 #5
0
    def open_setting_clock_page(self):
        if hmi.obj_exists(Text.HOUR_MODE_24_TEXT) and hmi.obj_exists(
                Text.CLOCK_SETTINGS_TEXT):
            logging.info('Clock settings page is already open')

        elif tap_if_visible(Icons.SETTINGS_CLOCK_BUTTON):
            logging.info('Open clock settings page')
        else:
            self.open_settings_page()
            tap(Icons.SETTINGS_CLOCK_BUTTON)
예제 #6
0
 def open_occupancy_mode_page(self):
     if hmi.obj_exists(Text.SOUND_SETTINGS_OCCUPANCY_MODE_TITLE_TEXT
                       ) and hmi.obj_exists(
                           Text.SOUND_SETTINGS_DRIVER_TEXT):
         logging.info("Occupancy mode page is already open")
     elif tap_if_visible(Text.SOUND_SETTINGS_OCCUPANCY_MODE_TEXT):
         logging.info("Open speed compensated volume page")
     else:
         self.open_sound_settings_page()
         tap(Text.SOUND_SETTINGS_OCCUPANCY_MODE_TEXT)
예제 #7
0
 def open_navigation_dialog_page(self):
     if hmi.obj_exists(Text.NAVIGATION_FAULT_DESCRIPTION_TEXT):
         logging.info("Navigation fault dialog is already open")
     elif tap_if_visible(Icons.MAIN_NAVIGATION_BUTTON_INACTIVE):
         logging.info('Open Navigation fault dialog')
     else:
         raise Exception('Can`t open Navigation dialog page')
예제 #8
0
def test_tap_object_by_screen_point_object_data(get_state_audio_button_object):
    screen_point_object = vhat_client.ScreenPoint()
    icon_object = get_state_audio_button_object
    # copy coordinates x and y from icon_object to screen_point_object for click on button
    screen_point_object.x, screen_point_object.y = icon_object.x, icon_object.y
    hmi.tap_object(screen_point_object)
    assert hmi.obj_exists(check_object)
예제 #9
0
 def open_phone_page(self):
     if hmi.obj_exists(Icons.PHONE_PAIR_PHONE_BUTTON):
         logging.info("Phone page is already open")
     elif tap_if_visible(Icons.MAIN_PHONE_BUTTON_INACTIVE):
         logging.info('Open Phone page')
     else:
         raise Exception('Can`t open phone page')
예제 #10
0
 def open_mobile_apps_page(self):
     if hmi.obj_exists(Text.MOBILE_APPS_ADD_A_DEVICE_TEXT):
         logging.info("Mobile apps page is already open")
     elif tap_if_visible(Icons.MAIN_APPS_BUTTON_INACTIVE):
         logging.info('Open Mobile apps page')
     else:
         raise Exception('Can`t open Mobile apps page')
예제 #11
0
 def open_apps_page(self):
     if hmi.obj_exists(Text.APPS_PAGE_FIND_APPS_TEXT):
         logging.info('Apps is already open')
     elif tap_if_visible(Icons.MAIN_APPS_BUTTON_INACTIVE):
         logging.info('Open Apps page')
     else:
         tap(Icons.MAIN_APPS_BUTTON_ACTIVE)
예제 #12
0
 def open_settings_general_page(self):
     if hmi.obj_exists(Text.SETTINGS_GENERAL_SETTINGS_LABEL_TEXT):
         logging.info("General settings page is already open")
     elif tap_if_visible(Icons.SETTINGS_GENERAL_BUTTON):
         logging.info('Open general settings page')
     else:
         self.open_settings_page()
         tap(Icons.SETTINGS_GENERAL_BUTTON)
예제 #13
0
 def open_settings_automatic_updates_page(self):
     if hmi.obj_exists(Text.SETTINGS_AUTOMATIC_SYSTEM_UPDATES_TEXT):
         logging.info("Automatic system settings page is already open")
     elif tap_if_visible(Icons.SETTINGS_AUTOMATIC_UPDATES_BUTTON):
         logging.info('Open automatic system settings page')
     else:
         self.open_settings_page()
         tap(Icons.SETTINGS_AUTOMATIC_UPDATES_BUTTON)
예제 #14
0
 def open_bluetooth_page(self):
     if hmi.obj_exists(Text.BLUETOOTH_SETTINGS_TITLE_TEXT):
         logging.info('Bluetooth page is already open')
     elif tap_if_visible(Text.BLUETOOTH_TEXT):
         logging.info('Open bluetooth page')
     else:
         self.open_connection_settings()
         tap(Text.BLUETOOTH_TEXT)
예제 #15
0
 def open_map_preferences_page(self):
     if hmi.obj_exists(Text.CITY_MODEL_TEXT):
         logging.info('Map preferences page is already open')
     elif tap_if_visible(Text.MAP_PREFERENCES_TEXT):
         logging.info('Open map preferences settings page')
     else:
         self.open_setting_navigation_page()
         tap(Text.MAP_PREFERENCES_TEXT)
예제 #16
0
 def open_setting_sync_connect_page(self):
     if hmi.obj_exists(Text.SETTING_CONNECTIVITY_SETTINGS_TEXT):
         logging.info("SYNC connect settings page is already open")
     elif tap_if_visible(Icons.SETTINGS_SYNC_CONNECT_BUTTON):
         logging.info('Open SYNC connect settings page')
     else:
         self.open_settings_page()
         tap(Icons.SETTINGS_SYNC_CONNECT_BUTTON)
예제 #17
0
 def open_mobile_apps_settings(self):
     if hmi.obj_exists(Text.MOBILE_APPS_SETTINGS_TITLE_TEXT):
         logging.info("Mobile Apps settings page is already open")
     elif tap_if_visible(Icons.SETTINGS_MOBILE_APPS_BUTTON):
         logging.info('Open Mobile Apps settings')
     else:
         self.open_settings_page()
         tap(Icons.SETTINGS_MOBILE_APPS_BUTTON)
예제 #18
0
 def open_settings_display_page(self):
     if hmi.obj_exists(Text.SETTINGS_DISPLAY_SETTINGS_TITLE_TEXT):
         logging.info("Display settings page is already open")
     elif tap_if_visible(Icons.SETTINGS_DISPLAY_BUTTON):
         logging.info('Open display settings page')
     else:
         self.open_settings_page()
         tap(Icons.SETTINGS_DISPLAY_BUTTON)
예제 #19
0
 def open_add_phone_page(self):
     if hmi.obj_exists(Icons.ADD_PHONE_TITLE_ICON):
         logging.info('Add phone page is already open')
     elif tap_if_visible(Icons.PHONE_PAGE_ADD_PHONE_BUTTON):
         logging.info('Open add phone page')
     else:
         self.open_phone_page()
         tap(Icons.PHONE_PAGE_ADD_PHONE_BUTTON)
예제 #20
0
 def tap_on_climate_defrost_button(self):
     if hmi.obj_exists(Text.DEFROST_CONTROLS_TEXT):
         logging.info("Defrost dialog is already open")
     elif tap_if_visible(Icons.CLIMATE_DEFROST_BUTTON):
         logging.info('Open defrost dialog')
     else:
         self.open_climate_page()
         tap(Icons.CLIMATE_DEFROST_BUTTON)
예제 #21
0
 def tap_on_climate_a_c_button(self):
     if hmi.obj_exists(Text.CLIMATE_A_C_CONTROLS_TEXT):
         logging.info("A/C dialog is already open")
     elif tap_if_visible(Icons.CLIMATE_A_C_BUTTON_ACTIVE):
         logging.info('Open A/C dialog')
     else:
         self.open_climate_page()
         tap(Icons.CLIMATE_A_C_BUTTON_ACTIVE)
예제 #22
0
 def open_route_preferences_page(self):
     if hmi.obj_exists(Text.PREFERRED_ROUTE_TEXT):
         logging.info('Route preferences page is already open')
     elif tap_if_visible(Text.ROUTE_PREFERENCES_TEXT):
         logging.info('Open route preferences settings page')
     else:
         self.open_setting_navigation_page()
         tap(Text.ROUTE_PREFERENCES_TEXT)
예제 #23
0
 def open_connection_settings(self):
     if hmi.obj_exists(Text.CONNECTION_SETTINGS_TITLE_TEXT):
         logging.info("Connection settings page is already open")
     elif tap_if_visible(Text.CONNECTION_SETTINGS_BUTTON_TEXT):
         logging.info('Open connection settings page')
     else:
         self.open_settings_page()
         tap(Text.CONNECTION_SETTINGS_BUTTON_TEXT)
예제 #24
0
 def open_balance_fade_page(self):
     if hmi.obj_exists(Icons.SETTINGS_SOUND_BALANCE_RESET_BUTTON):
         logging.info('Balance / Fade page is already open')
     elif tap_if_visible(Text.SOUND_SETTINGS_BALANCE_FADE_TEXT):
         logging.info('Open balance / fade page')
     else:
         self.open_sound_settings_page()
         tap(Text.SOUND_SETTINGS_BALANCE_FADE_TEXT)
예제 #25
0
 def open_radio_settings(self):
     if hmi.obj_exists(Text.RADIO_SETTINGS_TITLE_TEXT):
         logging.info("Radio settings page is already open")
     elif tap_if_visible(Icons.SETTINGS_RADIO_BUTTON):
         logging.info('Open Radio settings')
     else:
         self.open_settings_page()
         tap(Icons.SETTINGS_RADIO_BUTTON)
예제 #26
0
 def open_sound_settings_page(self):
     if hmi.obj_exists(Text.SOUND_SETTINGS_TITLE_TEXT):
         logging.info("Sound settings page is already open")
     elif tap_if_visible(Icons.SOUND_SETTINGS_BUTTON):
         logging.info('Open sound settings page')
     else:
         self.open_settings_page()
         tap(Icons.SOUND_SETTINGS_BUTTON)
예제 #27
0
 def open_general_settings(self):
     if hmi.obj_exists(Text.GENERAL_SETTINGS_TITLE_TEXT):
         logging.info("General settings page is already open")
     elif tap_if_visible(Text.GENERAL_SETTINGS_BUTTON_TEXT):
         logging.info('Open general settings page')
     else:
         self.open_settings_page()
         tap(Text.GENERAL_SETTINGS_BUTTON_TEXT)
예제 #28
0
 def open_settings_vehicle_page(self):
     if hmi.obj_exists(Text.SETTINGS_VEHICLE_TITLE_TEXT):
         logging.info("Vehicle settings page is already open")
     elif tap_if_visible(Icons.SETTINGS_VEHICLE_BUTTON):
         logging.info('Open vehicle settings page')
     else:
         self.open_settings_page()
         tap(Icons.SETTINGS_VEHICLE_BUTTON)
예제 #29
0
 def open_tone_settings_page(self):
     if hmi.obj_exists(Icons.SETTINGS_SOUND_RESET_ALL_BUTTON):
         logging.info('Tone settings page is already open')
     elif tap_if_visible(Text.TONE_SETTINGS_TEXT):
         logging.info('Open tone settings page')
     else:
         self.open_sound_settings_page()
         tap(Text.TONE_SETTINGS_TEXT)
예제 #30
0
 def open_settings_voice_control_page(self):
     if hmi.obj_exists(Text.SETTINGS_VOICE_CONTROL_SETTINGS_TITLE_TEXT):
         logging.info("Voice control settings page is already open")
     elif tap_if_visible(Icons.SETTINGS_VOICE_CONTROL_BUTTON):
         logging.info('Open voice control settings page')
     else:
         self.open_settings_page()
         tap(Icons.SETTINGS_VOICE_CONTROL_BUTTON)