Last active
November 19, 2018 23:15
-
-
Save converge/4349e9f0e0411a08094a3a42f97e1280 to your computer and use it in GitHub Desktop.
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
try: | |
WebDriverWait(self.driver, 10).until( | |
EC.presence_of_element_located((By.ID, "emailFrame")) | |
) | |
self.driver.switch_to_frame( | |
self.driver.find_element_by_id("emailFrame")) | |
# click first image | |
''' | |
WebDriverWait(self.driver, 180).until( | |
EC.presence_of_element_located((By.XPATH, "//img")) | |
) | |
''' | |
""" I added it ---> """ | |
pre = browser.find_element_by_tag_name("html").text | |
cupom = re.search('(?<=\*\*:\s)\w{10}', pre, re.IGNORECASE) | |
if cupom: | |
cupom = cupom.group(0) | |
print(cupom) | |
else: | |
logger.warning('Unable to locate cupom code') | |
""" end """ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment