Skip to content

Commit c22051c

Browse files
committed
add ubsubscribe
1 parent 137b5e9 commit c22051c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/functional/android/bidi_tests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,9 @@ def test_bidi_log(self) -> None:
6464
self.driver.get_log('server')
6565

6666
log_entries = []
67+
bidi_log_param = {'events': ['log.entryAdded'], 'contexts': ['NATIVE_APP']}
6768

68-
self.driver.script.conn.execute(
69-
command_builder('session.subscribe', {'events': ['log.entryAdded'], 'contexts': ['NATIVE_APP']})
70-
)
69+
self.driver.script.conn.execute(command_builder('session.subscribe', bidi_log_param))
7170

7271
def _log(entry: AppiumLogEntry):
7372
# e.g. {'type': 'syslog', 'level': 'info', 'source': {'realm': ''}, 'text': '08-05 13:30:32.617 29677 29709 I appium : channel read: GET /session/d7c38859-8930-4eb0-960a-8f917c9e6a38/source', 'timestamp': 1754368241565}
@@ -77,3 +76,4 @@ def _log(entry: AppiumLogEntry):
7776
self.driver.page_source
7877
assert len(log_entries) != 0
7978
self.driver.script.conn.remove_callback(AppiumLogEntry, callback_id)
79+
self.driver.script.conn.execute(command_builder('session.unsubscribe', bidi_log_param))

0 commit comments

Comments
 (0)