google/EarlGrey

Add CSS selector matcher

Open

#211 opened on 2016年8月8日

GitHub で見る
 (11 comments) (2 reactions) (0 assignees)Objective-C (760 forks)batch import
Hacktoberfesttype: feature-request

Repository metrics

Stars
 (5,424 stars)
PR merge metrics
 (平均マージ 1d 1h) (30d で 8 merged PRs)

説明

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.

コントリビューターガイド