AppQuery AppQuery AppQuery Class

Definition

Fluent query API for specifying view elements to match for queries and gestures.

public class AppQuery : Xamarin.UITest.Queries.ITokenContainer, Xamarin.UITest.Utils.IFluentInterface
type AppQuery = class
    interface ITokenContainer
    interface IFluentInterface
Public Class AppQuery
Implements IFluentInterface, ITokenContainer
Inheritance
AppQueryAppQueryAppQuery
Implements

Constructors

AppQuery(QueryPlatform) AppQuery(QueryPlatform) AppQuery(QueryPlatform)

Initial constructor for queries. Should not be called directly, but used as part of the fluent API in the app classes.

AppQuery(AppQuery, Object[]) AppQuery(AppQuery, Object[]) AppQuery(AppQuery, Object[])

Constructor for adding more tokens to an existing query in an immutable fashion. Takes the tokens from the old query plus the additional tokens.

Properties

QueryPlatform QueryPlatform QueryPlatform

The target platform of the query. Useful when writing extensions methods for queries for platform differences.

Methods

All(String) All(String) All(String)

Changes the query to return all elements instead of just the visible ones.

Button(String) Button(String) Button(String)

Matches a button. For Android: An element that has class (or inherits from) android.widget.Button. For iOS: An element with class UIButton.

Child(Int32) Child(Int32) Child(Int32)

Changes the query to return the n'th child element of the currently matched ones.

Child(String) Child(String) Child(String)

Changes the query to return child elements of the currently matched ones.

Class(String) Class(String) Class(String)

Matches element class. For Android (no '.' in className): An element that has a class name of the given value (case insensitive). For Android ('.'s in className): An element which has a class (or super class) fully qualified name that matches the value. For iOS (first char lowercase): An element that has the class (or super class) name of the given value prepended with "UI". Example: button becomes UIButton. For iOS (first char uppercase): An element that has the class (or super class) name of the given value.

ClassFull(String) ClassFull(String) ClassFull(String)

Matches element class. For Android (no '.' in className): An element that has a class name of the given value (case insensitive). For Android ('.'s in className): An element which has a class (or super class) fully qualified name that matches the value. For iOS: An element that has the class (or super class) name of the given value.

Css(String) Css(String) Css(String)

Matches elements in web views matching the given css selector. Must be used on web view elements. If used alone, will default to android.webkit.WebView for Android and UIWebView for iOS.

Descendant(Int32) Descendant(Int32) Descendant(Int32)

Changes the query to return the n'th descendant element of the currently matched ones.

Descendant(String) Descendant(String) Descendant(String)

Changes the query to return descendant elements of the currently matched ones.

Frame(String) Frame(String) Frame(String)

Matches a Frame/IFrame, allowing subsequent Css queries to execute within that frame. Must be used on web view elements. If used alone, will default to android.webkit.WebView for Android and UIWebView for iOS.

Id(Int32) Id(Int32) Id(Int32)

Matches element id. For Android: An element with the given value as id. Allows properties of an Android App project's Resource.Id to be used in Id() queries. For iOS: An element with the string version of the given value as accessibilityIdentifier.

Id(String) Id(String) Id(String)

Matches element id. For Android: An element with the given value as id. For iOS: An element with the given value as accessibilityIdentifier.

Index(Int32) Index(Int32) Index(Int32)

Matches the nth element of the currently matched elements.

Invoke(String) Invoke(String) Invoke(String)

Invokes a method on the view elements matched by the query. Can be chained to invoke methods on the results.

Invoke(String, Object) Invoke(String, Object) Invoke(String, Object)

Invokes a method on the view elements matched by the query. Can be chained to invoke methods on the results.

Invoke(String, Object, Object) Invoke(String, Object, Object) Invoke(String, Object, Object)

Invokes a method on the view elements matched by the query. Can be chained to invoke methods on the results.

Invoke(String, Object, Object, Object) Invoke(String, Object, Object, Object) Invoke(String, Object, Object, Object)

Invokes a method on the view elements matched by the query. Can be chained to invoke methods on the results.

Invoke(String, Object, Object, Object, Object) Invoke(String, Object, Object, Object, Object) Invoke(String, Object, Object, Object, Object)

Invokes a method on the view elements matched by the query. Can be chained to invoke methods on the results.

Invoke(String, Object, Object, Object, Object, Object) Invoke(String, Object, Object, Object, Object, Object) Invoke(String, Object, Object, Object, Object, Object)

Invokes a method on the view elements matched by the query. Can be chained to invoke methods on the results.

InvokeJS(String) InvokeJS(String) InvokeJS(String)

Invokes javascript on the view elements matched by the query. If view elements other than WebViews are encountered, the execution will halt and an Exception will be thrown.

Marked(String) Marked(String) Marked(String)

Matches common values. For Android: An element with the given value as either id, contentDescription or text. For iOS: An element with the given value as either accessibilityLabel or accessibilityIdentifier.

Parent(String) Parent(String) Parent(String)

Changes the query to return parent elements of the currently matched ones.

Parent(Int32) Parent(Int32) Parent(Int32)

Changes the query to return the n'th parent element of the currently matched ones.

Property(String) Property(String) Property(String)

Allows for further filtering on a given property value.

Property(String, Boolean) Property(String, Boolean) Property(String, Boolean)

Matches a property or getter method value on the element.

Property(String, Int32) Property(String, Int32) Property(String, Int32)

Matches a property or getter method value on the element.

Property(String, String) Property(String, String) Property(String, String)

Matches a property or getter method value on the element.

Raw(String, Object, Object, Object, Object, Object) Raw(String, Object, Object, Object, Object, Object) Raw(String, Object, Object, Object, Object, Object)

A raw Calabash selector. Allows for string based Calabash queries.

Raw(String, Object, Object, Object, Object) Raw(String, Object, Object, Object, Object) Raw(String, Object, Object, Object, Object)

A raw Calabash selector. Allows for string based Calabash queries.

Raw(String, Object, Object, Object) Raw(String, Object, Object, Object) Raw(String, Object, Object, Object)

A raw Calabash selector. Allows for string based Calabash queries.

Raw(String, Object, Object, Object, Object, Object, Object) Raw(String, Object, Object, Object, Object, Object, Object) Raw(String, Object, Object, Object, Object, Object, Object)

A raw Calabash selector. Allows for string based Calabash queries.

Raw(String, Object) Raw(String, Object) Raw(String, Object)

A raw Calabash selector. Allows for string based Calabash queries.

Raw(String) Raw(String) Raw(String)

A raw Calabash selector. Allows for string based Calabash queries.

Raw(String, Object, Object) Raw(String, Object, Object) Raw(String, Object, Object)

A raw Calabash selector. Allows for string based Calabash queries.

Sibling(Int32) Sibling(Int32) Sibling(Int32)

Changes the query to return the n'th sibling element of the currently matched ones.

Sibling(String) Sibling(String) Sibling(String)

Changes the query to return sibling elements of the currently matched ones.

Switch(String) Switch(String) Switch(String)

Matches a Switch. For Android: An element that inherits from android.widget.CompoundButton. For iOS: An element with class UISwitch.

Text(String) Text(String) Text(String)

Matches element text.

TextField(String) TextField(String) TextField(String)

Matches a TextField. For Android: An element that has class (or inherits from) android.widget.EditText. For iOS: An element with class UITextField.

ToString() ToString() ToString()

Converts the string into it's Calabash query equivalent.

WebView() WebView() WebView()

Matches WebViews

WebView(Int32) WebView(Int32) WebView(Int32)

Matches the nth WebView

XPath(String) XPath(String) XPath(String)

Matches elements in web views matching the given XPath selector. Must be used on web view elements. If used alone, will default to android.webkit.WebView for Android and UIWebView for iOS.

Explicit Interface Implementations

ITokenContainer.Tokens ITokenContainer.Tokens ITokenContainer.Tokens
IFluentInterface.GetType() IFluentInterface.GetType() IFluentInterface.GetType()

Applies to