I am using Python selenium chrome driver and i am stuck at filling out the csc and the year of the creditcard information field ( look at picture ). The credit card number and month works fine with this code:
iframe = driver.find_element_by_xpath("//iframe[@class='js-iframe']")
driver.switch_to.frame(iframe)
inputCC = WebDriverWait(driver, 30).until(
lambda driver: driver.find_element_by_id("encryptedCardNumber")
)
inputCC.send_keys("1111222233334444")
driver.switch_to.default_content()
time.sleep(1)
iframe = driver.find_element_by_xpath("//iframe[@class='js-iframe']")
driver.switch_to.frame(iframe)
inputCC = WebDriverWait(driver, 30).until(
lambda driver: driver.find_element_by_id("encryptedExpiryMonth")
)
inputCC.send_keys("08")
driver.switch_to.default_content()
I tried to use the same for the csc and year with changing the id but it didnt work. How to do it?