Repository navigation
Find by javascript support and other improvements - #13
Merged
Merged
Conversation
…gh Chrome Additions: - findElementsBy magic methods in WebDriver - environment variables to change the tests url and browser - an environment variable to specify tests should be run in a single browser instance (speed improvement) - innerHTML and outerHTML convenience methods in WebElement - find elements By user javascript selector - new tab hack in TargetLocator Modifications: - Docblock and PhpStorm code inspection fixes - better timing precision in WebDriverWait->until - moved phpunit.xml to phpunit.xml.dist (and generate code coverage)
… closes the parent window.
…bDriver will convert WebElements to a usable type when calling executeScriptInternal.
…code duplication (added parent selector restriction to findElement(s)). Hacky support for jsSelector from a WebElement.
polosantiago
pushed a commit
that referenced
this pull request
Oct 5, 2013
Contributor
|
Andrew, Thanks for your valuable contributions, as I went through your edits, realized the good quality |
Contributor
|
Internal tests run way more faster now with the single browser instance |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Developers tend to have better familiarity with js selectors than xpath/css. I've extended the By class to include a jsSelector method which takes an optional second argument to specify how the lookup should be performed, e.g.
It's also possible to speed up the running of unit tests by adjusting the environment variables introduced in phpunit.xml.dist (copy to phpunit.xml). The tests extend an abstract class which reset the browser state at the end of every test removing the need for the browser to be restarted between tests. Chrome's performance is several times faster than Firefox and I'm able to run the entire test suite in 45 seconds.
Changelog
Additions:
Modifications: