element: Error thrown when switching to iframe
Describe 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)
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 17 (8 by maintainers)
@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
Hey @HieuLeKMS ,
I will give this a shot and confirm the results back with you. Thanks for the hard work.
That is going to be the WAF that is blocking you! Maybe you could try this again simply look at the iframe or mimic it locally to see if you can reproduce the issue. If your trying to run from the homepage all the way to checkout the WAF will most likely pick you up as a bot and block you.