Unable to select iframe using selenium - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: Unable to select iframe using selenium (/thread-7464.html) |
Unable to select iframe using selenium - endejoli - Jan-11-2018 I am trying to automate login process for web page https://hpconnected.com/en/us, login form is an iframe and I am trying to switch to iframe using the id, but it does not work at all. Any help will be appreciated. from selenium import webdriver from selenium.webdriver.common.by import By driver = webdriver.Chrome(executable_path=r"C:\test\chromedriver.exe") driver.get('https://www.hpconnected.com/us/en') driver.find_element_by_link_text("Sign In").click() driver.implicitly_wait(20) #driver.switch_to_frame(driver.find_element_by_tag_name("iframe")) iframe = driver.find_element_by_id('webauthPanelIFrame') driver.switch_to.frame(iframe) username = driver.find_element_by_name("email") driver.implicitly_wait(20) username.send_keys("test@ABC.com") RE: Unable to select iframe using selenium - j.crater - Jan-11-2018 Please edit your post so that the code is contained in Python code tags. You can find help here. |