Bug 1736061 - Ensure second page is loaded in test_switch_window_content.py test_switch_to_unloaded_tab before continuing. r=whimboo,webdriver-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D128618
This commit is contained in:
Mark Banner 2021-10-16 07:57:55 +00:00
Родитель 68f0c010f5
Коммит 6cbcdd15c2
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -186,7 +186,10 @@ class TestSwitchToWindowContent(WindowManagerMixin, MarionetteTestCase):
current_tab = self.marionette.current_window_handle
[other_tab] = filter(lambda handle: handle != current_tab, window_handles)
self.assertEqual(self.marionette.get_url(), second_page)
Wait(self.marionette, timeout=5).until(
lambda _: self.marionette.get_url() == second_page,
message="Expected URL in the second tab has been loaded",
)
self.marionette.switch_to_window(other_tab)
Wait(self.marionette, timeout=5).until(