-
Notifications
You must be signed in to change notification settings - Fork 43
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
Support More Complex CSS Selectors #389
Comments
By large parts implemented in https://github.com/retest/recheck-web/compare/feature/implement-issue-389 |
Create predicates for css selectors in separate class. Configure supported css selectors via regex expression and factory method.
Test multiple selectors in PredicateBuilder. Refactor PredicateBuilder.
Create predicates for css selectors in separate class. Configure supported css selectors via regex expression and factory method.
Test multiple selectors in PredicateBuilder. Refactor PredicateBuilder.
I checked the css files of some popular websites listed on Wikipedia. Pseudo-Selectors starting with |
Create predicates for css selectors in separate class. Configure supported css selectors via regex expression and factory method.
Test multiple selectors in PredicateBuilder. Refactor PredicateBuilder.
Refactor Has class to simplify implementation of attribute selectors. Implement all attribute selectors.
All kinds of attribute selectors using [*] specified on w3schools are implemented. |
Test multiple selectors in PredicateBuilder. Refactor PredicateBuilder.
Refactor Has class to simplify implementation of attribute selectors. Implement all attribute selectors.
Create predicates for css selectors in separate class. Configure supported css selectors via regex expression and factory method.
Test multiple selectors in PredicateBuilder. Refactor PredicateBuilder.
Refactor Has class to simplify implementation of attribute selectors. Implement all attribute selectors.
Recheck currently supports the following pseudo-class selectors:
Recheck currently does not support the following pseudo-class selectors:
An integration test checks all those selectors. The following classes could be easily supported by a small extension in
|
Create predicates for css selectors in separate class. Configure supported css selectors via regex expression and factory method.
Test multiple selectors in PredicateBuilder. Refactor PredicateBuilder.
Refactor Has class to simplify implementation of attribute selectors. Implement all attribute selectors.
Other improvements concerning TestHealer are added as JIRA issues: RET-1913 and RET-1912. |
Problem
When we encounter missing elements with the Unbreakable Selenium, we try to find the old element inside the golden master. Therefore, we query the
By
used and look what type was used (i.e.By.id
,By.class
).However, when we try to find
By.cssSelector
, we currently only support simple css selectors. The supported selectors look for some known attributes likeid
orclass
. For example:By.cssSelector( "#id" );
By.cssSelector( ".class" );
This should be the same for
@FindBy
.Solution
We want to support more complex selectors. Note, that this issue should only address selectors that query the current element. It should not look for children or parents. A complete specification of CSS selectors can be found in the CSS specification.
The current element would mean to selects any element (this also includes any
*
or no selector) and queries a predicate[]
or state:
. Note that the state may only look at the elements' attributes. Please refer to the examples below.Examples this issue should address:
.class1.class2
p.intro
div, p
a[target]
a[target=_blank
input:checked
Examples not considered for this issue (see #390):
div p
div > p
p::before
p:nth-child(4)
Community
I kindly ask the community to provide examples below that should be reflected with this issue, so that we can use these to test the implementation.
The text was updated successfully, but these errors were encountered: