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

feat: selector inspector panel (closes #7375) #7372

Merged
merged 27 commits into from
Feb 10, 2023
Merged

feat: selector inspector panel (closes #7375) #7372

merged 27 commits into from
Feb 10, 2023

Conversation

felis2803
Copy link
Contributor

@felis2803 felis2803 commented Nov 7, 2022

Closes #7375.

Use cases

  1. Picking + generation. Click on the Pick button and select the element with a mouse click. As a result, several selectors matching this element will be generated. The first of the generated selectors will be placed in the selector input, the rest are available in the list of selectors, which can be expanded by clicking on the arrow to the left of the Copy button.
  2. Debug selector. Start typing the selector in CSS or TestCafe format. As you type, all matching elements will be highlighted with a frame. In addition, to the right of the input field there is an indicator that shows the number of matching elements.

Peculiarities

In the picking mode all elements of TestCafe UI, except for the frame that highlights the element, disappear.

Input selector format. The Selector Inspector recognizes selectors in two formats: CSS and TestCafe.
CSS: div > div input, p:nth-child(2), span[custom-attribute="value"].className
TestCafe: Selector('.my-class'), Selector('div').withText('Hello World!')

Match indicator. It has three states: not found, incorrect selector and found: {number of elements}.

List of generated selectors. Cleared as soon as the user starts typing in the selector input field.

Highlighting elements matching the input selector is active only when the selector input has focus.

Restrictions

  1. The inspector is currently only available in debug mode (await t.debug()).
  2. Picking does not work in iframes.
  3. Picking doesn't work with Shadow DOM.
  4. The selector generator is not configurable.
  5. There is only one generator so far, and the user will not be able to redefine the generation function.

Initial state

изображение

Picking

021

Selector typing

022

Selecting a selector from a list

023

Copy selector

024

@felis2803 felis2803 temporarily deployed to CI November 7, 2022 07:10 Inactive
@felis2803 felis2803 changed the title feat: selector inspector panel (ui only) [demo] feat: selector inspector panel (ui only) Nov 7, 2022
@felis2803 felis2803 temporarily deployed to CI November 7, 2022 07:30 Inactive
@felis2803 felis2803 changed the title [demo] feat: selector inspector panel (ui only) [demo] feat: selector inspector panel (UI only) Nov 7, 2022
@felis2803 felis2803 marked this pull request as draft November 7, 2022 07:42
@felis2803 felis2803 temporarily deployed to CI November 7, 2022 07:42 Inactive
@felis2803 felis2803 temporarily deployed to CI November 7, 2022 08:21 Inactive
@felis2803 felis2803 temporarily deployed to CI November 7, 2022 08:26 Inactive
@felis2803 felis2803 temporarily deployed to CI November 7, 2022 09:50 Inactive
@felis2803 felis2803 temporarily deployed to CI November 7, 2022 11:28 Inactive
@felis2803 felis2803 temporarily deployed to CI November 8, 2022 08:50 Inactive
@felis2803 felis2803 temporarily deployed to CI November 10, 2022 05:57 Inactive
@felis2803 felis2803 temporarily deployed to CI November 14, 2022 16:14 Inactive
@felis2803 felis2803 temporarily deployed to CI November 15, 2022 07:20 Inactive
@felis2803 felis2803 temporarily deployed to CI November 15, 2022 14:15 Inactive
@felis2803 felis2803 temporarily deployed to CI November 16, 2022 13:00 Inactive
@felis2803 felis2803 temporarily deployed to CI November 17, 2022 08:50 Inactive
@felis2803 felis2803 temporarily deployed to CI November 17, 2022 14:14 Inactive
@felis2803 felis2803 temporarily deployed to CI November 24, 2022 14:41 Inactive
@felis2803 felis2803 temporarily deployed to CI November 25, 2022 11:43 Inactive
@AndreyBelym AndreyBelym changed the title [demo] feat: selector inspector panel (UI only) [demo] feat: selector inspector panel (closes #7375) Nov 30, 2022
@felis2803 felis2803 temporarily deployed to CI December 30, 2022 10:23 — with GitHub Actions Inactive
@felis2803 felis2803 temporarily deployed to CI January 16, 2023 08:53 — with GitHub Actions Inactive
@felis2803 felis2803 temporarily deployed to CI January 18, 2023 14:22 — with GitHub Actions Inactive
@felis2803 felis2803 temporarily deployed to CI January 19, 2023 15:45 — with GitHub Actions Inactive
@felis2803 felis2803 temporarily deployed to CI January 20, 2023 05:49 — with GitHub Actions Inactive
@felis2803 felis2803 temporarily deployed to CI January 20, 2023 07:12 — with GitHub Actions Inactive
@felis2803 felis2803 temporarily deployed to CI February 10, 2023 07:43 — with GitHub Actions Inactive
@felis2803 felis2803 enabled auto-merge (squash) February 10, 2023 11:35
@felis2803 felis2803 merged commit 90fe0ac into DevExpress:master Feb 10, 2023
@felis2803 felis2803 deleted the si branch February 10, 2023 12:15
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

Release v2.4.0-rc.1 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add some UI to allow inspecting Selectors on the target page
3 participants