New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 748748 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

"Clear text" button in UITextField loses accessibility label in Xcode 9/iOS 11

Project Member Reported by liaoyuke@chromium.org, Jul 25 2017

Issue description

Bookmarks tests used to access the "Clear text" button in UITextField by   
[[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(@"Clear text")]
      performAction:grey_tap()];

However, it seems that Apple has a bug, and the "Clear text" label gone in Xcode beta 4/ iOS 11.

So this has been worked around as:

id<GREYMatcher> clearTextButton = grey_allOf(grey_ancestor(grey_accessibilityID(titleIdentifier)) , grey_kindOfClass([UIButton class]), nil);
[[EarlGrey selectElementWithMatcher:clearTextButton]
      performAction:grey_tap()];

We'll check back when the official Xcode 9 has released and see if this will be fixed.
 
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e72d3bf6d974cf9d9a78efce9c3cf8bc00e071b

commit 2e72d3bf6d974cf9d9a78efce9c3cf8bc00e071b
Author: sczs <sczs@chromium.org>
Date: Wed Jul 26 00:47:07 2017

[ios] Fixes bookmark tests for iOS11

Getting the clear button from the text field since the clear button has 
no accessibility label on iOS11/XCode9 betas thus we can't access it directly. 
EarlGray team believes that this could be a bug and might be fixed later on.

Bug:  748748 
Change-Id: I50a8d0649556dc2b5db531111b8581a7f838f854
Reviewed-on: https://chromium-review.googlesource.com/585767
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489500}
[modify] https://crrev.com/2e72d3bf6d974cf9d9a78efce9c3cf8bc00e071b/ios/chrome/browser/ui/bookmarks/bookmarks_egtest.mm

Status: Fixed (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ae5d58af1439acbbc521605911afc822ec4a222

commit 6ae5d58af1439acbbc521605911afc822ec4a222
Author: Yuke Liao <liaoyuke@chromium.org>
Date: Mon Aug 14 15:52:07 2017

Fix bookmark egtests on iOS 11.

This CL replaces grey_typeText with grey_replaceText whenever possible.

There are two reasons for this change:

1. We should favor grey_replaceText over grey_typeText because 
grey_replaceText is faster and more stable.

2. EarlGrey has a bug on iOS 11 where grey_typeText hangs indefinitely
on iPad.

Bug: 753098, 644730,  748748 
Change-Id: Idcdde77c8884a3a7ff616377afc48611d48e22f8
Reviewed-on: https://chromium-review.googlesource.com/611254
Reviewed-by: Ramya Sharma <ramyasharma@chromium.org>
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494056}
[modify] https://crrev.com/6ae5d58af1439acbbc521605911afc822ec4a222/ios/chrome/browser/ui/bookmarks/bookmarks_egtest.mm

Sign in to add a comment