-
-
Notifications
You must be signed in to change notification settings - Fork 750
WebDriverIO nested iframe support in the within block #755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… because the clickable element was not visible.
…a previous commit
…ers so it matches with the tests now
…ll use of within for the sake of consistency
The Travis’s build is currently failing due to being unresponsive for 10 mins. Here is the excert from the Travis log. |
@renancouto Travis had issues with pulling images from DockerHub yesterday, more info here: https://www.traviscistatus.com/incidents/v4jnp6nkgzqx Looks like issue is still present when I'm writing this :< |
🤔 @jploskonka maybe you meant @reubenmiller? |
Thanks, this look awesome! Yeah, you are right Nightmare can be far less stable than WebDriverIO so this feature is really handy. |
Ups, tab completion missclick, sorry :D |
The Travis pull issue should be resolved now (https://status.docker.com/pages/incident/533c6539221ae15e3f000031/59f1da512cd214649ebc33b0) |
Yes, it did. Thanks for good PR |
* [WebDriverIO] Added support for nested iframes in the within block * Added the @Nightmare tags to the extended nested iframe tests * Modified default window size because the a few tab tests were failing because the clickable element was not visible. * Added acceptance tests for the within feature for both WebDriverIO and Nightmare * Updated expected window height in webapi tests due to changing it in a previous commit * Fixed initial window size in the SeleniumWebdriver and Nightmare Helpers so it matches with the tests now * Change the example with nested iframes in the docs so it shows the full use of within for the sake of consistency
@reubenmiller , thanks again for sending this pull request. Please take a look at new Puppeteer helper. It can execute tests headlessly as Nightmare does but it has much cleaner API. Frames are first-class citizens there. Maybe you will also consider Puppeteer to be a better alternative to Nightmare |
@DavertMik Yeah I might have some time over the holidays so I'll see what I can do. |
Adding support for setting nested iframes (i.e. as an array) to the WebDriverIO.
The application that I am testing makes heavy use of iframes, and overall WebDriverIO handles iframes better than Nightmare (though more on that later).
Summary
Example
Here is the example Scenario taken out of the
./test/acceptance/within_test.js
which shows the usage.Tests
The following tests were run after the changes and everything looks good.
node ./bin/codecept.js run -c ./test/acceptance/codecept.WebDriverIO.json --grep WebDriverIO
node ./bin/codecept.js run -c ./test/acceptance/codecept.Nightmare.json --grep nightmare
npm tests
mocha test/helper/WebDriverIO_test.js
mocha test/helper/SeleniumWebdriver_test.js
Extra notes about iframes and Nightmare
The following works with WebDriverIO, but not with Nightmare. Nightware will say that it can not find the text
Email Address
, and it will print out the text of all elements from the iframe page before the I.click('Sign in!') was executed.I will chalk this up to a limitation with Nightmare and not due to my code changes since these tests were already failing when I made my fork.
P.S. This is my first pull request, so just let me know if I need to change something to get it into the 'standard' pull request format.