Skip to content

Commit

Permalink
Add example
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmilano committed May 25, 2022
1 parent cc2c0d5 commit 1111d18
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions examples/start-activity-ui-automator-helper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Copyright (C) 2013-2022 Diego Torres Milano
Created on 2022-05-24 by Culebra v21.4.2
__ __ __ __
/ \ / \ / \ / \
____________________/ __\/ __\/ __\/ __\_____________________________
___________________/ /__/ /__/ /__/ /________________________________
| / \ / \ / \ / \ \___
|/ \_/ \_/ \_/ \ o \
\_____/--<
@author: Diego Torres Milano
@author: Jennifer E. Swofford (ascii art snake)
"""

from com.dtmilano.android.viewclient import ViewClient

device, serialno = ViewClient.connectToDeviceOrExit()

kwargs2 = {'useuiautomatorhelper': True}
vc = ViewClient(device, serialno, **kwargs2)

vc.uiAutomatorHelper.target_context.start_activity('com.android.chrome', 'com.google.android.apps.chrome.Main',
uri='https://google.com')

0 comments on commit 1111d18

Please sign in to comment.