Created
November 22, 2017 02:03
-
-
Save Visgean/11f6e14a31a8753bbc0d6d487e39cafc to your computer and use it in GitHub Desktop.
selenium screenshot
This file contains 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
try: | |
self.wait.until(EC.presence_of_element_located( | |
(By.TAG_NAME, 'iframe') | |
)) | |
except ElementNotVisibleException as e: | |
import base64 | |
with open("/home/visgean/imageToSave.png", "wb") as fh: | |
fh.write(base64.b64decode(e.screen.encode())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment