(self, prefix, save_dir)
| 116 | return result |
| 117 | |
| 118 | def get_xml(self, prefix, save_dir): |
| 119 | dump_command = f"adb -s {self.device} shell uiautomator dump " \ |
| 120 | f"{os.path.join(self.xml_dir, prefix + '.xml').replace(self.backslash, '/')}" |
| 121 | pull_command = f"adb -s {self.device} pull " \ |
| 122 | f"{os.path.join(self.xml_dir, prefix + '.xml').replace(self.backslash, '/')} " \ |
| 123 | f"{os.path.join(save_dir, prefix + '.xml')}" |
| 124 | result = execute_adb(dump_command) |
| 125 | if result != "ERROR": |
| 126 | result = execute_adb(pull_command) |
| 127 | if result != "ERROR": |
| 128 | return os.path.join(save_dir, prefix + ".xml") |
| 129 | return result |
| 130 | return result |
| 131 | |
| 132 | def back(self): |
| 133 | adb_command = f"adb -s {self.device} shell input keyevent KEYCODE_BACK" |
no test coverage detected