Created
August 18, 2020 18:56
-
-
Save seleniumgists/dd253323c842ed86760fe06fc85c8fef to your computer and use it in GitHub Desktop.
generated automatically from #selenium on seleniumhq slack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.driver.find_element(By.CSS_SELECTOR, "facebook").click() | |
wait.until(EC.number_of_windows_to_be(2)) | |
for window_handle in driver.window_handles: | |
if window_handle != original_window: | |
driver.switch_to.window(window_handle) | |
break | |
sleep(10) | |
wait.until(EC.title_contains("facebook")) | |
assert "Facebook" in driver.title | |
self.driver.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment