clickSelector only clicks first element found
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 621
- PR merge metrics
- No merged PRs in 30d
Description
In `clickAndHoverHelper.js` the line `await page.click(clickSelectorIndex);` only clicks the first element found. It should click all elements found with the given selector.
Suggested fix:
`for (var element of document.querySelectorAll(clickSelectorIndex)) {
element.click();
}`
This might also be the case for `page.hover()` and `page.type()` (keypress)
Contributor guide
Research direction
Start by reading clickAndHoverHelper.js at the page.click(clickSelectorIndex) call and trace how the selector is used. Verify the behavior for multiple matching elements, then check whether the same concern applies to page.hover() and page.type(). Done means the relevant actions consistently handle all elements matched by the given selector.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100