I'm trying to get text of an element in the temp mail website which is;
https://www.temporary-mail.net/
My purpose is to get temp mail as a string
the CSS : "input#active-mail" XPATH = "//*[@id="active-mail"]"
i tried to use .text and get_attribute() methods, but failed!
I could not get the text of the CSS element, am i doing something wrong? As far as I can see it is not in the iFrame but I'm not sure, can someone enlighten me ?
codes:
driver.get("https://www.temporary-mail.net/")
kontrol = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.XPATH, '//*[@id="active-mail"]'))
)
time.sleep(1)
tmpMail_text = driver.find_element_by_xpath('//*[@id="active-mail"]').text
#or
tmpMail_attr = driver.find_element_by_xpath('//*[@id="active-mail"]').get_attribute("data-clipboard-text")
print(tmpMail_text )
print(tmpMail_attr )
time.sleep(1)