Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
18 lines (14 loc) · 680 Bytes

File metadata and controls

18 lines (14 loc) · 680 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os
def ensure_dir(directory):
if not os.path.exists(directory):
os.makedirs(directory)
def take_screenhot_and_logcat(driver, device_logger, calling_request):
logcat_dir = device_logger.logcat_dir
screenshot_dir = device_logger.screenshot_dir
driver.save_screenshot(os.path.join(screenshot_dir, calling_request + ".png"))
logcat_file = open(os.path.join(logcat_dir, calling_request + "_logcat.log"), 'wb')
logcat_data = driver.get_log('logcat')
for data in logcat_data:
data_string = str(data['timestamp']) + ": " + str(data['message'])
logcat_file.write((data_string + '\n').encode("UTF-8"))
logcat_file.close()
Morty Proxy This is a proxified and sanitized view of the page, visit original site.