Repository navigation
Test iframe JS behaviors - #115
xurizaemon wants to merge 2 commits into
Conversation
- evaluateScript() and executeScript() run in iframe window context - clicks in iframes produce mousedown, mouseup, click on element - change event fires once in iframe
|
✅ I've tried running these new tests on https://github.com/minkphp/MinkSelenium2Driver (chrome) and all passed. ❌ I've tried running these new tests on https://github.com/minkphp/MinkSelenium2Driver (firefox) and these (2 of 4) failed: IFrameTest::testClickInIFrameTriggersChangeEvent: IFrameTest::testClickInIFrameTriggersMouseEvents: ✅ I've tried running these new tests on https://github.com/minkphp/webdriver-classic-driver (firefox) and all passed. ✅ I've tried running these new tests on https://github.com/minkphp/webdriver-classic-driver (chrome) and all passed. |
|
Thanks, really appreciate the cross-checks!
Looks like the clicked element is not visible and the driver does not scroll it into view before clicking? 300x150 is a default iframe size in most (?) browsers. If that's the case, setting iframe dimensions in the fixture might do the job. I will take a look (when time allows!) at the Firefox/Selenium2 setup to better understand. Since these tests have come from issues identified in dmore/chrome-mink-driver (details linked above), it's possible they are revealing edge cases in Selenium2/Firefox. Interested in your cross-driver test rig 😁 |
Added width and height attributes to the iframe. Quick test via Github web UI to see if breakage is related to target visibility (which is not the intended subject of the test).
|
I set non-default height/width on the iframe in 5126c30 I'm trying to locate how you ran the tests across several drivers - I didn't find docs, but when I came back to it and cheated by searching for "running" (from your comment), I found #103 which looks like the ticket. I'm trying to get that working now so I'm not depending on you running them for me again 😄 Update (2): Looks like the #103 changes don't surface failure as expected - would very much appreciate if you can point the way to running the various suites to test this! No pressure, I'll keep trying to work it out if not :D |
|
My setup is this:
This way I can easily test any driver PR and see if changes to driver-testsuite would fail on any of drivers before these changes are merged. |
|
@xurizaemon, thank you. The last change you did fixed it for me. So I think we're good to go here. Thank you for pointing out that currently we have no tests asserting a scroll-into-view problem that Firefox doesn't automatically handle, but Chrome does. Added them in #117 PR. The |
|
@xurizaemon, I've also tested with minkphp/MinkSelenium2Driver#389 applied on your original PR commit (6f16aa2 - iframe without explicit dimensions), and it no longer fails. |
|
Is there anything more I can do for this? |
Extend iframe tests to JS - ensure clicks and script context behave as expected.
Extracted from dmore/chrome-mink-driver#100
Only same-origin iframes tested.