Fix ComponentLocator with inherited classes without custom connector (#9176)
Logic for finding elements corresponding a server-side classname does
not work with inherited classes. For example making MyGrid extends Grid,
you could not find the specific MyGrid, but only the common Grid.
In most cases this is not a problem since these components are usually
the only instance of said superclass, but the Composite introduced in
the same UI, which makes testing them impossible.
This patch adds the specific classname information for ServerConnectors
that can be used to find the correct connector instance.
Revert to old simpleName logic (differs for inner classes) (#15544)
All existing recorded TB tests contain Outer$Inner and not Inner so they will
fail if this is switched to using Class.getSimpleName
Change-Id: Ic79355fbc61403ed2929271d302db35e20dda38c
Changed implementations and APIs to use the non-deprecated Element class
wherever possible without breaking backwards compatibility.
* Methods defined in interfaces have not been touched.
* Return types have only been changed methods that should have no
existing third party callers (i.e. private, internal or @since 7.2)
* For methods that third party code might have overridden, the method
has been deprecated in favor of a new method that just delegates to the
old method.
* For methods that can't reasonably be overridden by third party code
(i.e. private, final, static, internal or @since 7.2), the parameter
type has been changed without retaining the old method.
Change-Id: I7da943a77b8d0d0b9185d8c70f87d676a275d24b
Use FQN instead of import for the bad Element class (#13287)
This is the first step towards eliminating usage of the class. Reasoning
about upcoming steps will be easier when it's clear which class
"Element" refers to.
Change-Id: Iea5547f789edc77c3b4ac95a5e2eb34d2717999e
Implement TestBench4 features in debug window (#12694)
Done:
- VaadinFinderLocatorStrategy returns optimal paths for any Widget
selectable by it.
- TestBenchSection of the Debug Window picks and clears as expected.
- Debug Window no longer presents user with a widget hierarchy
- Translation from VaadinFinderLocatorStrategy query strings to
ElementQuery API calls (should be done in SelectorPath.java)
- Make SelectorPaths change background color when hovered
Change-Id: Ie122f962a319ddf560fa9ac4f6bc57f32a120f91
Support mixed legacy and VaadinFinder locators (#12641, #12642, #12643)
ComponentLocator tries to use all available locator strategies until a
match is found (#12641) and VaadinFinderLocatorStrategy also accepts
simple indexed paths (#12642) with legacy locators as a backup. To
enable mixed use of locators, LegacyLocatorStrategy now implements
getElementByPathStartingAt() (#12643).
Change-Id: I6b763565adef0e294b353ef6e2dfdf70ae0d77a9