Ejemplo n.º 1
0
 def do(self):
     for i in range(self.iterations):
         # go to Settings
         ui_steps.click_button(serial = self. serial,
                                 view_to_find = {"className": "android.widget.ImageButton"})()
         ui_steps.click_button(serial = self.serial,
                                 view_to_find = {"className": "android.widget.TextView"},
                                 view_to_check = {"text": "Settings"})()
         ui_steps.click_checkbox_button(serial = self.serial,
                                 view_to_find = {"text":"Enable RDS"}, state = "OFF", relationship="right")()
         logcat_steps.grep_for(serial = self.serial, grep_for_text = "radio_hw: disable RDS decoding", text_presence = True)()
         logcat_steps.clear_logcat(serial = self.serial)()
         ui_steps.click_checkbox_button(serial = self.serial,
                                 view_to_find = {"text":"Enable RDS"}, state = "ON", relationship="right")()
         logcat_steps.grep_for(serial = self.serial, grep_for_text = "radio_hw: enable RDS decoding", text_presence = True)()
         ui_steps.press_back(serial = self. serial,
                                 view_to_check = {"text": "FM Radio"})()
         time.sleep(self.wait_time)
Ejemplo n.º 2
0
    encryption = args["encryption"]

#configure the AP

ap_steps.setup(dhcp_lease=dhcp_lease_time,
               new_ssid=ddwrt_ap_name,
               mode=mode,
               encryption=encryption,
               security=security,
               wifi_password=ddwrt_ap_pass)()

##### test start #####

#clear the logcat

logcat_steps.clear_logcat(serial=serial)()

adb_steps.connect_device(serial=serial, port=adb_server_port)()

# turn display on, if turned off
ui_steps.wake_up_device(serial=serial)()

# ensure the device is unlocked
ui_steps.unlock_device(serial=serial, pin=wifi_defaults.wifi['pin'])()

# go to home screen
ui_steps.press_home(serial=serial)()

# make sure there are no saved networks
wifi_generic_steps.clear_saved_networks(serial=serial)()