Skip to content

Commit e9db507

Browse files
committed
Add unit tests Activate app
1 parent 7a8b1da commit e9db507

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/unit/webdriver/app_test.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,19 @@ def test_terminate_app(self):
8888
assert {'app': "com.app.id"}, get_httpretty_request_body(httpretty.last_request())
8989
assert result is True
9090

91+
@httpretty.activate
92+
def test_activate_app(self):
93+
driver = android_w3c_driver()
94+
httpretty.register_uri(
95+
httpretty.POST,
96+
appium_command('/session/1234567890/appium/device/activate_app'),
97+
body='{"value": ""}'
98+
)
99+
result = driver.activate_app("com.app.id")
100+
101+
assert {'app': 'com.app.id'}, get_httpretty_request_body(httpretty.last_request())
102+
assert isinstance(result, WebDriver)
103+
91104
@httpretty.activate
92105
def test_background_app(self):
93106
driver = android_w3c_driver()

0 commit comments

Comments
 (0)