mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-72593 behat: Load the Field node content locally for processing
The standard NodeElement functions for getAttribute, getTagName, getParent, and friends go back to WebDriver and parse the DOM for each request. This is insanely slow per request, and in the case of forms we do a lot of checking to determine the field type. This change modifies the form field detection to copy the entire node content into a DOMDocument and parse the document locally. This is significantly faster - in some cases where there are large documents minutes faster. I believe that this should be a safe change as the document fetched from the browser is normalised to match the doctype specified.
- Loading branch information
1 parent
c71b2db
commit 4258188
Showing
1 changed file
with
84 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters