Created
August 24, 2018 17:30
-
-
Save vmesel/4bef2b4fd00bbc232c3bc1a585dac919 to your computer and use it in GitHub Desktop.
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
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.by import By | |
driver = webdriver.Firefox() | |
driver.get("http://web.whatsapp.com") | |
qr_code = WebDriverWait(driver, 60).until( | |
EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div/div[2]/div[1]/div[2]/div/img")) | |
) | |
print(qr_code.get_attribute("src")) | |
driver.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment