Error thrown when switching to iframe
See original GitHub issueDescribe the bug When attempting to switch context to an iframe that contains some form fields i’m recieving the folllowing error
+66s info: ===> Step 'Test: User enters credit card information'
+66s info: ---> wait()
+66s info: ---> wait()
step error -> failed
+66s error:
Error: Could not match frame by name or id: 'easyXDM_default4069_provider'
Detail:
Documentation needed! Please report this at https://github.com/flood-io/element/issues so that we can improve Element!
+66s error: xxxx Step 'Test: User enters credit card information' failed
+66s info: ---> Step 'Test: User enters credit card information' finished
failed, bailing out of steps
+66s info: Iteration completed in 64858ms (walltime)
+66s info: Test completed after 1 iterations
To Reproduce Steps to reproduce the behavior:
- Go to ‘https://www.blinds.com’ and simply search for a product add to cart and get all the way to credit card checkout screen where you enter in your information
Expected behavior I’m expected to be able to enter credit card details into the iframe presented in the page
Desktop (please complete the following information):
- OS: macOS
- Node.js version: 14.4
- Version: 1.2.3
code
await browser.wait(Until.urlContains('Ordering/Checkout/Billing'))
let iframe = await browser.findElement(By.tagName('iframe'))
await browser.switchTo().frame(iframe)
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (8 by maintainers)
Top Results From Across the Web
error switching to iframe selenium python
Currently I'm attempting to switch to iframe/fancybox, but i'm getting the following error: line 237, in check_response raise ...
Read more >Switching to IFrame throw TypeError: Cannot call a class ...
Testcafe throws an error: 1) An error occurred in Selector code: ... Switching to IFrame throw TypeError: Cannot call a class as a...
Read more >SafariDriver fails to switch to frames/iframes? Not currently ...
3945 doesn't talk about switching to iframes, but it does state this : "If an iframe is removed from the DOM after the...
Read more >How to handle iFrame in Selenium
Learn how to handle iframe in Selenium with the SwitchTo() method to switch between frames along with code samples.
Read more >How to Handle iFrames in Selenium Webdriver: switchTo()
Let's take an example to switch frame in Selenium displayed in the below image. Our requirement is to click the iframe.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@HieuLeKMS not sure if this is related, but I figure the more clues, the better.
In the case mentioned above, since I know the iframe containing the credit card field is the only other frame available, I tried just referencing it by the frame index and here’s what happened:
output:
Thanks for the hep @HieuLeKMS