Calabash only supports web view which is in build in mobile application and not supported web application opened on mobile browser. I have searched such type application and finally got from MonketTalk sample application. In this I have created step definition and automated below form:
Mobile view:
Html code view:
I have created a following steps definition function for above:
Mobile view:
Html code view:
I have created a following steps definition function for above:
//function to click on web menu
When /^click on web menu$/ do
wait_for(:timeout => 20){ element_exists("* id:'tab_txt' text:'web'")}
touch(query("* id:'tab_txt' text:'web'"))
sleep 5
end
//function to enter value in text field
When /^enter into input field$/ do
performAction('set_text','css' ,'#userInput', "Test");
end
//function to enter value in text area field
When /^enter into text area$/ do
performAction('set_text','css' ,'#txtarea',"This is testing");
end
//function to click radio button
When /^click on Radio button B$/ do
touch("webView css:'#b'")
end
//function to click radio check box
When /^click on check boxes$/ do
touch("webView css:'#d'")
touch("webView css:'#e'")
touch("webView css:'#f'")
end
//function to click on go button
When /^click on go button$/ do
touch(query("webView css:'input[name=\"btn\"]'"))
end


Hi,
ReplyDeleteThanks for ur tutorial. I have followed these steps. everything is working fine except set_text in textarea.
I am also using monkey talk app for testing.
Hi
ReplyDeleteCan you please help me , in which location i have to update the HTML file