calabash / calabash-android

Automated Functional testing for Android using cucumber
Other
1.68k stars 618 forks source link

Unable to get web elements in android app #777

Closed raj284 closed 8 years ago

raj284 commented 8 years ago

My android app has payment options. So when i tap on pay it opens a web view where i have to enter the card details and pay.

I am trying to identify the elements in web view but command is not returning any elements. I have used following commands:

query("webView css:'#header'") query("webView css:'*'") query("SystemWebView css:'#header'")

Please help me. There is no enough documentation is available regarding this. do i need any specific setup?

TobiasRoikjer commented 8 years ago

Likely the class is not webView nor SystemWebView. query("*") and find the right view.

raj284 commented 8 years ago

@TobiasRoikjer it is advanced webview. but i am not able to query;

[ 6] { "class" => "com.practo.fabric.ui.AdvancedWebView", "tag" => nil, "description" => "com.practo.fabric.ui.AdvancedWebView{b64fc31 VFEDHVC.. .F...... 0,196-1440,2308 #7f0c0215 app:id/wv_main}", "id" => "wv_main", "visible" => true, "rect" => { "height" => 2112, "width" => 1440, "y" => 280, "x" => 0, "center_x" => 720, "center_y" => 1336 }, "enabled" => true, "contentDescription" => nil },