Skip to content
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

Add support to distinguish between multiple places on a page with the same text/name #82

Merged
merged 33 commits into from
Sep 12, 2016

Conversation

fhoeben
Copy link
Owner

@fhoeben fhoeben commented Sep 12, 2016

Sometime page can contain multiple elements that have the same label/text. So far browser test was unable to distinguish between these, except when using technical selectors.
This pull request adds code to indicate a certain 'place' should be inside some other context.

For example a form containing details about two people, a buyer en seller, might use the same labels for each person's details. But the seller's details are grouped together under a 'Seller' heading and the buyer's are grouped under a 'Buyer' heading.
Now browser test can be told to |enter|John|as|Name|in|Seller| and |click|Add Phone|in|Buyer|. When multiple calls are made that reference the same container a test can also |set search context to|Buyer| to make all subsequent calls work only with the elements in the buyer's section.

The context to look for can (currently) be specified using:

  • Fieldset label.
  • Aria 'label' attribute or 'describedby' reference.
  • Technical selector.

…ent calls use that context without the usage of 'in' statements in each line.
Also refactored method to send  values to some parameter order as other methods
…hods, and allow it to be overriden is subclasses
@fhoeben fhoeben closed this Sep 12, 2016
@fhoeben fhoeben reopened this Sep 12, 2016
@fhoeben fhoeben merged commit 35077c1 into master Sep 12, 2016
@fhoeben fhoeben deleted the findElementInContainer branch September 12, 2016 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant