-
Notifications
You must be signed in to change notification settings - Fork 41
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
Forcing element states #249
Comments
@ollie-iterators could you please be more explicit about what your topic is? It would be helpful to have some code examples or links to get an understanding of your request. Thanks. |
I'm not sure what "force the element state" means, or quite what devtools functionality you're referring to. Please reopen if you are able to provide more detail on the missing functionality. |
If you right click on an element in the browser (Chrome or FireFox), and click Inspect, then you will go to the developer tools. There will be an option visible on the screen called ":hov" which is near the text saying "Filter Styles". It allows you to force the element into a certain state. The states that the element can be forced to are: :hover, :active, :focus, :focus-visible, :focus-within, :visited, :target. In Safari, you can right click on the element, press Inspect Element, which again goes to the developer tools. Right clicking on the code for an element shows a button in the user interface that says Change pseudo class. The pseudo classes that it can change to are the same as the ones for Chrome and FireFox |
It sounds like that this is what CDP offers via: |
Ok, but it would be good if there was an option to do that without CDP so that it could work on other browsers |
Sure, WebDriver BiDi is independent. My comment was just about a reference point that could be used when designing the API for that feature request. |
I have noticed that you can force an element to go into a certain state in the different browsers (Chrome, Firefox, Safari). I have tried to see how to do that with a webdriver, but it is impossible to find a way to do that without the Developer tools.
I think it would be a good feature to have the ability to force element state without using the developer tools for a browser.
The text was updated successfully, but these errors were encountered: