There are steps where we want to check that
"something" does not appear in the page
or does not exist. We still have to spin
but we don't need to spin for 6 seconds.
NodeElement->hasAttribute() (JS enabled) queries selenium
about whether it has any attribute or not, if due to an
AJAX request the field node changed selenium can not access
that node and throws an exception.
It includes 2 more minor fixes:
- Escapes values sent to TinyMCE as it was breaking
when values contained double quotes.
- Adding seconds to the screenshots directory to
avoid using the same folder for multiple runs.
1/ always require 3 behat settings - $CFG->behat_wwwroot, $CFG->behat_dataroot and $CFG->behat_prefix
2/ cleanup init code
3/ do not require $CFG->wwwroot and $CFG->dataroot on test sites
4/ remove switch completely - the most confusing part for me
5/ print out behat_wwwwroot in init script so that you can test the test site manually
To select an option is specially painful, every browser
behaves differently and phantomjs just joined the party
throwing "Element does not exist in cache" random
exceptions that we need to catch.
* When looking for texts inside the page or inside
other containers we should wait until the elements
are visible.
* Same when expanding tree nodes.
* Normalizing loops to spin() function using
behat_base::TIMEOUT and behat_base::EXTENDED_TIMEOUT,
leaving TIMEOUT for DOM load processes and
EXTENDED_TIMEOUT for long processes that involves JS
too.
* Add page load waits between actions that involves
reloading the page.
In general aiming for compatibility with multiple browsers,
firefox, chrome and phantomjs to be more specific.
* Removing hardcoded waits
* Adding @_alert, @_switch_window and @_switch_frame tags,
to label actions that different drivers have problems with.
* Adding missing @_files_upload and @_only_local tags to features that
uploads files.
* Fixing a few wait for page ready what specified miliseconds.
* New methods to ensure elements (usual selectors), sections and editors
are ready to interact with
* Changing the select an option implementation to deal with the different
drivers implementations when listening to JS events.
The filepicker was changed to use M.core.dialogue - this
patch updates the behat suite to search the changed dom for
the file picker windows closed event.