-1

Please help me to fill any field on the site: https://www.easytransfer.kz/.

I'm using Python 2.7.
Already tried to add a delay to the script.

The script:

from selenium import webdriver
browser = webdriver.Firefox()

browser.implicitly_wait(60) # seconds
browser.get('https://www.easytransfer.kz/')

user1 = browser.find_element_by_name("pan1")
user1.send_keys("5307")
סטנלי גרונן
  • 2,917
  • 23
  • 46
  • 68
  • 1
    You need to [wait until the element is available](https://stackoverflow.com/questions/34504839/how-do-i-use-seleniums-wait) – GalAbra Jan 20 '18 at 16:15

1 Answers1

0

As per site https://www.easytransfer.kz/ the intended fields are within an <iframe>. So you have switch_to the <iframe> first then lookout for the elements as follows :

driver.get('https://www.easytransfer.kz/')
WebDriverWait(driver, 10).until(EC.frame_to_be_available_and_switch_to_it((By.XPATH,"//iframe[@src='https://payment.processinggmbh.ch/CNPConsumerWebsite/BACardToCard']")))
user1 = driver.find_element_by_name("pan1")
user1.send_keys("5307")
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352