OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_ |
| 6 #define IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #import <EarlGrey/EarlGrey.h> |
| 11 |
| 12 namespace chrome_test_util { |
| 13 |
| 14 // Matcher for element with accessbitility label corresponding to |message_id| |
| 15 // and acessibility trait UIAccessibilityTraitButton. |
| 16 id<GREYMatcher> buttonWithAccessibilityLabelId(int message_id); |
| 17 |
| 18 // Matcher for element with accessbitility label corresponding to |label| and |
| 19 // acessibility trait UIAccessibilityTraitButton. |
| 20 id<GREYMatcher> buttonWithAccessibilityLabel(NSString* label); |
| 21 |
| 22 // Matcher for element with accessbitility label corresponding to |message_id| |
| 23 // and acessibility trait UIAccessibilityTraitStaticText. |
| 24 id<GREYMatcher> staticTextWithAccessibilityLabelId(int message_id); |
| 25 |
| 26 // Matcher for element with accessbitility label corresponding to |label| and |
| 27 // acessibility trait UIAccessibilityTraitStaticText. |
| 28 id<GREYMatcher> staticTextWithAccessibilityLabel(NSString* label); |
| 29 |
| 30 // Returns matcher for webview owned by a web controller. |
| 31 id<GREYMatcher> webViewBelongingToWebController(); |
| 32 |
| 33 // Returns matcher for webview containing |text|. |
| 34 id<GREYMatcher> webViewContainingText(std::string text); |
| 35 |
| 36 // Returns matcher for webview not containing |text|. |
| 37 id<GREYMatcher> webViewNotContainingText(std::string text); |
| 38 |
| 39 // Matcher for WKWebView containing a blocked |image_id|. When blocked, the |
| 40 // image element will be smaller than actual image. |
| 41 id<GREYMatcher> webViewContainingBlockedImage(std::string image_id); |
| 42 |
| 43 // Returns matcher for a StaticHtmlViewController containing |text|. |
| 44 id<GREYMatcher> staticHtmlViewContainingText(NSString* text); |
| 45 |
| 46 // Matcher for the navigate forward button. |
| 47 id<GREYMatcher> forwardButton(); |
| 48 |
| 49 // Matcher for the navigate backward button. |
| 50 id<GREYMatcher> backButton(); |
| 51 |
| 52 // Matcher for the reload button. |
| 53 id<GREYMatcher> reloadButton(); |
| 54 |
| 55 // Matcher for the stop loading button. |
| 56 id<GREYMatcher> stopButton(); |
| 57 |
| 58 // Returns a matcher for the omnibox. |
| 59 id<GREYMatcher> omnibox(); |
| 60 |
| 61 // Returns a matcher for the page security info button. |
| 62 id<GREYMatcher> pageSecurityInfoButton(); |
| 63 |
| 64 // Returns matcher for omnibox containing |text|. Performs an exact match of the |
| 65 // omnibox contents. |
| 66 id<GREYMatcher> omniboxText(std::string text); |
| 67 |
| 68 // Matcher for Tools menu button. |
| 69 id<GREYMatcher> toolsMenuButton(); |
| 70 |
| 71 // Matcher for show tabs button. |
| 72 id<GREYMatcher> showTabsButton(); |
| 73 |
| 74 // Matcher for CollectionViewSwitchCell. |
| 75 id<GREYMatcher> collectionViewSwitchCell(NSString* accessibilityIdentifier, |
| 76 BOOL isOn); |
| 77 |
| 78 } // namespace chrome_test_util |
| 79 |
| 80 #endif // IOS_CHROME_TEST_EARL_GREY_CHROME_MATCHERS_H_ |
OLD | NEW |