I'm trying to make a script to checkout on a Shopify site and I was able to find the iframe for the card number, but was not able to find the iframe for the name on the card (2nd iframe). Is there any way to enter in a value for that iframe?
driver.switch_to.frame(driver.find_element_by_tag_name("iframe"))
driver.find_element_by_xpath('//input[@autocomplete="cc-number"]').send_keys("1234")
driver.find_element_by_xpath('//div[@data-card-field-placeholder="Name on card"]').click()
driver.switch_to.frame(driver.find_element_by_tag_name("iframe"))
driver.find_element_by_xpath('//input[@autocomplete="cc-name"]').send_keys("First Last")
I've tried
driver.find_element_by_xpath('//input[@autocomplete="cc-name"]').send_keys("First Last")
and it gives me Unable to locate element
Image for reference: https://i.stack.imgur.com/BgeF1.jpg