MCPcopy
hub / github.com/appium/python-client / test_navigation

Function test_navigation

test/functional/ios/safari_tests.py:63–79  ·  view source on GitHub ↗

Test Safari navigation to Google.

(driver: 'WebDriver')

Source from the content-addressed store, hash-verified

61
62
63def test_navigation(driver: 'WebDriver') -> None:
64 """Test Safari navigation to Google."""
65 contexts = driver.contexts
66 for context in contexts:
67 if context.startswith('WEBVIEW_'):
68 driver.switch_to.context(context)
69 break
70 else:
71 pytest.fail('Could not set WEBVIEW context')
72
73 driver.get('http://google.com')
74 for _ in range(5):
75 time.sleep(0.5)
76 if 'Google' == driver.title:
77 return
78
79 pytest.fail('The title was wrong')

Callers

nothing calls this directly

Calls 1

contextMethod · 0.45

Tested by

no test coverage detected