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

Improve 'trusted-click-element' — check for 'containsText' of all matched selectors #468

Open
Alex-302 opened this issue Dec 2, 2024 · 0 comments

Comments

@Alex-302
Copy link
Member

Alex-302 commented Dec 2, 2024

It seems, at the moment, containsText checks only the first matched element, and cannot be used for buttons without different attributes.

Expected:

  1. find element(s) by a selector
  2. refining the search for an element by containsText
  3. click the first element, matched by a selector and by containsText (if matched more than one)
    Example with a wide selector, where containsText must help:
    example.com#%#//scriptlet('trusted-click-element', 'button', 'containsText:Accept necessary')
@adguard-bot adguard-bot assigned AdamWr and unassigned maximtop Dec 2, 2024
@adguard-bot adguard-bot changed the title Improve trusted-click-element - check for containsText of all matched selectors Improve 'trusted-click-element' — check for 'containsText' of all matched selectors Dec 2, 2024
@slavaleleka slavaleleka added the enhancement Improvement of existent feature label Dec 2, 2024
adguard pushed a commit that referenced this issue Dec 4, 2024
…f all matched selectors. #468

Squashed commit of the following:

commit e050074
Author: Adam Wróblewski <[email protected]>
Date:   Tue Dec 3 09:19:03 2024 +0100

    Update docs
    Rename `element` to `selector`

commit c773ffd
Author: Slava Leleka <[email protected]>
Date:   Tue Dec 3 11:05:51 2024 +0300

    src/helpers/open-shadow-dom-utils.ts edited online with Bitbucket

commit a990771
Author: Adam Wróblewski <[email protected]>
Date:   Mon Dec 2 14:36:52 2024 +0100

    Improve 'trusted-click-element' — check for 'containsText' of all matched selectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants