try to dynamically find the element type from xpath#136
Open
Castone22 wants to merge 3 commits into
Open
Conversation
Member
|
No description provided. |
Contributor
Author
|
Allows oz to create attempt to infer the element type from an xpath if it is used. |
Member
|
That's the 'what' but what is the 'why'? |
Contributor
Author
|
To reduce replication :) |
Member
|
Of what? please provide a use case (yes I know we talked about this one, but I am trying to keep things clean) :) |
Contributor
Author
|
Might make sense to make this also work for css selectors... though given they are less likely to specify the exact element type you're looking for, and that they have a less standard format than xpaths, might be a lot of work for very little gain. |
Contributor
|
What is the current status of this merge request? Are we going forward with this pattern, or does it require some discussion? |
Backport changes from oz framework
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.
Attempts to reduce replication by checking if the element type is present within the xpath if it's provided, then passes that as a watir element, still supports manual overriding failing an auto detection.
Currently:
Given the element type was actually provided in the xpath (
h2[@class="fancy-text"]]), it makes sense for Oz to be able to infer it from the path, letting us do: