Post

1 Star2 Stars3 Stars4 Stars5 Stars
Loading ... Loading ...

By Rafaela Azevedo Hello mate !

I am writing about “How take a property inside an element in calabash-ios”, look the examples:

IOS

– This query is taking the property :TextContent for the element in a web page.

query(“WebView css:’#testid'”)[1][“textContent”]

– This query is taking the property :TextContent for the element.

query(“Label index:1”,:textContent)

– Look when you want a sub-property:

[
[0] {
“id” => “login_button”,
“enabled” => true,
“contentDescription” => nil,
“class” => “android.widget.Button”,
“text” => “Login”,
“rect” => {
“center_y” => 545.0,
“center_x” => 639.5,
“height” => 64,
“y” => 513,
“width” => 195,
“x” => 542
},
}
]

– This query is taking the property inside the group of properties.

query(“Label”).first[“rect”][“y”]

Android

– This query is taking the property :TextContent for the element in a web page.

query(“WebView css:’#testid'”,:textContent)

– This query is taking the property :TextContent for the element.

query(“Label index:1”,:textContent)

– Look when you want a sub-property:

[
[0] {
“id” => “login_button”,
“enabled” => true,
“contentDescription” => nil,
“class” => “android.widget.Button”,
“text” => “Login”,
“rect” => {
“center_y” => 545.0,
“center_x” => 639.5,
“height” => 64,
“y” => 513,
“width” => 195,
“x” => 542
},
}
]

– This query is taking the property inside the group of properties.

query(“Label index:1”,:rect,:y)

If you need help or have some comment to do, please write below :)

Thank you !

Source: http://azevedorafaela.wordpress.com/2014/08/25/how-take-a-property-inside-an-element-in-calabash-ios-and-calabash-android/

Category: Programming, QA, Test and Automation Stuffs, Uncategorized, calabash property query, calabash sub-property query, calabash-android property query, calabash-ios property query, get a property in a group of properties on calabash, get a sub-property on calabash, taking a sub-property on calabash, taking the property of a group of properties on calabash

Você também pode querer ler

Comments are off for this post.