w3c / w3c/webdriver

Extend the find-by-link-text location strategy to apply to all elements

Open
#353 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

https://www.w3.org/Bugs/Public/show_bug.cgi?id=24847

Wilhelm Joys Andersen:

Many of the interactive elements in web applications these days are not links, but arbitrary elements with event handlers. To test interaction with such elements, test authors often resort to using XPath.

XPath is an undesirable anti-pattern that should be killed with fire. To be able to fry it, we must first cater to its usecases and make it obsolete.

The first step can be to allow any element to be selected by its (visible) text:

https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html#link-text

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing find-by-link-text location strategy and the linked WebDriver link-text specification, then compare the current element scope with the requested behavior. Done means the strategy can select arbitrary elements by their visible text, with the resulting behavior verified against the relevant project tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.