I want Selenium to write hello
in this username field
<input autocomplete="off" autocapitalize="off" autocorrect="off" spellcheck="false" aria-invalid="false" id="email" aria-describedby="id-3" value="">
However, it is not working for me. I tried:
driver.get('https://account.proton.me/signup?plan=free&billing=12¤cy=EUR&language=en')
WebDriverWait(driver, 10).until(expected_conditions.presence_of_element_located((By.XPATH, '//*[@id="email"]'))).send_keys('hello')
What am I doing wrong? Error: selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
CodePudding user response:
You can try below line of code
driver.get('https://account.proton.me/signup?plan=free&billing=12¤cy=EUR&language=en')
driver.maximize_window()
driver.switch_to.frame(driver.find_element(By.XPATH,"//iframe[@class='challenge-width-increase h-custom']"))
email1=driver.find_element(By.ID,"email")
email1.send_keys("hello")
Import
from selenium import webdriver
from selenium.webdriver.common.by import By