Skip to content
Advertisement

After filling first card number field I can’t find any iframes on the page. How to solve this

class TestAplazame(unittest.TestCase):

JavaScript

Look from here

JavaScript

iframes are only available to the top block iframes elements are not available to the bottom block. included error message at the bottom

JavaScript

if name == ‘main‘: unittest.main()

Even I can’t find the same iframe anymore. What is the problem. how to fix it. It’s a payment gateway test. gateway is from stripe I believe. Here is the error message:

selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document

When I am accessing the iframes variable after filling the card field instead of switching to the next iframe “StaleElementReferenceException” this exception is throwing.

Any help would be appreciated.

all three card fields are different iframes: enter image description here

Advertisement

Answer

Its seems you are still in the earlier iframe you need to switch to default_content() before move to another iframe.

JavaScript

Then switch to another frame.

JavaScript

Let me know how this goes.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement