i'm using selenium with python to register into a website. My problem is that when i need to insert the credit card number and the security number, though i copy the xpath of the field, wait for the field to be visible and clickable, python raise a timeout exception becouse he didn't find any field with that xpath. The html code of the field is that:
<input id="cardnumber" autocomplete="cc-number" type="tel" pattern="[0-9]*" placeholder="1111 2222 3333 4444" data-encrypted-name="number" class="form-control">
UPDATE: Maybe I understand.
When I print out driver.page_source
I notice that it's not loaded properly, and now I understand why Selenium can't find nothing, neither by xpath, neither by name or everything. I notice that what is loaded can be clicked and all, but some fields are not loaded.
So why Selenium behave like that?
UPDATE AGAIN: Solved, the solution is that i need to switch iframe every time.