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 possibilty to use CSS pseudoclasses and pseudoelements in Selectors #2813

Closed
AndreyBelym opened this issue Sep 4, 2018 · 18 comments
Closed
Labels
AREA: client FREQUENCY: level 2 Support Center An issue created/received from the Support Center ticket. SYSTEM: automations TYPE: enhancement The accepted proposal for future implementation. TYPE: Web API support
Milestone

Comments

@AndreyBelym
Copy link
Contributor

Are you requesting a feature or reporting a bug?

Feature

What is the current behavior?

Currently you can't create a Selector like Selector(':active') or Selector('.seekbar__knob::before') (#2799)

What is the expected behavior?

You can create Selectors based on pseudoclasses and pseudoelements, or, at least, perform actions on them.

@ZeleniiZmey
Copy link

Any update on this?

@javcode
Copy link

javcode commented Apr 11, 2019

is there a workaround to do a click in a pseudo element like this? (when the parent is width 0, height 0)
until the actual functionality is implemented?

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Apr 11, 2019
@valen-tina
Copy link

Also interested in this question. I have pseudo element ::after and not sure how to work with it.

@javcode
Copy link

javcode commented Apr 12, 2019

My workaround is to create a client function to do the click:
const {Selector, ClientFunction} = require('testcafe');
Then
const closeDialogFunctionInClient = ClientFunction(() => document.querySelector('div.ngdialog-close').click()) .with({ boundTestRun: testController }) ; //because of the bloody ::before pseudo element await closeDialogFunctionInClient();

@AlexSkorkin AlexSkorkin removed the STATE: Need response An issue that requires a response or attention from the team. label Apr 15, 2019
@AllSidesCreative
Copy link

Any update on this?

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label May 16, 2019
@AlexKamaev
Copy link
Contributor

We do not have any updates on this issue yet. We still have plans to implement it, however, I can not give any estimates.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label May 16, 2019
@helen-dikareva helen-dikareva added the Support Center An issue created/received from the Support Center ticket. label Sep 17, 2019
@helen-dikareva
Copy link
Collaborator

we have a request for support such elements and classes in recorder so we need the implementation in TestCafe too https://github.com/DevExpress/testcafe-studio/issues/2237

@miherlosev
Copy link
Collaborator

@AndreyBelym AndreyBelym added STATE: Stale An outdated issue that will be automatically closed by the Stale bot. FREQUENCY: level 2 and removed STATE: Stale An outdated issue that will be automatically closed by the Stale bot. labels Oct 19, 2020
@lucimart
Copy link

Any update on how could I Select a pseudoelement?

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Oct 28, 2020
@arubtsov
Copy link
Contributor

@lucimart, No updates yet. At this point, the only workaround is to use ClientFunction.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Oct 29, 2020
@chaudhryu8
Copy link

Please tell if there is any update on this issue, Thanks.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Nov 12, 2021
@chaudhryu8
Copy link

Please also tell if there is any workaround for this issue.

@Farfurix
Copy link
Contributor

@chaudhryu8

Hello,

Unfortunately, there are no updates yet. You can use ClientFunction as a workaround.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Nov 16, 2021
@chaudhryu8
Copy link

chaudhryu8 commented Nov 18, 2021

@AlexSkorkin @Farfurix @javcode @valen-tina I tried above-mentioned workaround but it did not work for me. I am trying to click on a Pseudo element. Please share what modifications you made to above code snippet to make it work for you, Thanks.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Nov 18, 2021
@chaudhryu8
Copy link

chaudhryu8 commented Nov 25, 2021

@Farfurix @javcode Please help with resolving above issue, I am not able to completely understand below workaround, Thanks.

My workaround is to create a client function to do the click:
const {Selector, ClientFunction} = require('testcafe');
Then
const closeDialogFunctionInClient = ClientFunction(() => document.querySelector('div.ngdialog-close').click()) .with({ boundTestRun: testController }) ; //because of the bloody ::before pseudo element await closeDialogFunctionInClient();

@Farfurix
Copy link
Contributor

@chaudhryu8

Hello,

We try to keep the GitHub issues tracker for bugs and feature requests only. You can ask your question about ClientFunction on Stack Overflow.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Nov 29, 2021
@chaudhryu8
Copy link

chaudhryu8 commented Nov 30, 2021

@Farfurix I have posted this question at https://stackoverflow.com/q/70175904/13801198. Thanks. CC: @AlexSkorkin @javcode @valen-tina

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Nov 30, 2021
@miherlosev miherlosev removed the STATE: Need response An issue that requires a response or attention from the team. label Dec 2, 2021
@AlexKamaev
Copy link
Contributor

We discussed this use case with the team and decided to close this issue as we currently have higher-priority tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AREA: client FREQUENCY: level 2 Support Center An issue created/received from the Support Center ticket. SYSTEM: automations TYPE: enhancement The accepted proposal for future implementation. TYPE: Web API support
Projects
None yet
Development

No branches or pull requests