Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Unable to select iframe using selenium
#1
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")
Quote
#2
Please edit your post so that the code is contained in Python code tags. You can find help here.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Unable to access javaScript generated data with selenium and headless FireFox. pjn4 0 190 Aug-04-2019, 11:10 AM
Last Post: pjn4
  Looping actions in an iframe using Selenium on Python amyd 3 399 Mar-06-2019, 08:31 PM
Last Post: Larz60+
  Selenium Parsing (unable to Parse page after loading) oneclick 6 773 Jan-13-2019, 03:10 AM
Last Post: oneclick
  scraping with multiple iframe jansky 1 819 Nov-09-2018, 11:12 AM
Last Post: snippsat
  unable to load file using python selenium purnima1 4 2,860 Dec-12-2017, 04:04 PM
Last Post: hshivaraj
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 1,018 Nov-03-2017, 08:41 PM
Last Post: metulburr
  unable to login with selenium metulburr 4 2,372 Nov-30-2016, 04:56 AM
Last Post: metulburr

Forum Jump:


Users browsing this thread: 1 Guest(s)