google/EarlGrey

Add CSS selector matcher

Open

#211 aperta il 8 ago 2016

Vedi su GitHub
 (11 commenti) (2 reazioni) (0 assegnatari)Objective-C (760 fork)batch import
Hacktoberfesttype: feature-request

Metriche repository

Star
 (5424 star)
Metriche merge PR
 (Merge medio 1g 1h) (8 PR mergiate in 30 g)

Descrizione

Given the following input:

Matching on title or value will fail.

$x('//input[@title="Email" or @value="Email"]')
> []

Place holder matching works but it's not unique.

$x('//input[@title="Email" or @value="Email" or @placeholder="Email"]')
> [<input class=​"ic-Input" type=​"text" name=​"pseudonym_session[unique_id]​" value placeholder=​"Email">​, 
   <input class=​"ic-Input" type=​"text" name=​"pseudonym_session[unique_id_forgot]​" value placeholder=​"Email" id=​"pseudonym_session_unique_id_forgot">​]

I think we need to allow matching on arbitrary XPath selectors since there's no way to control the content of the webview.

Guida contributor