calabash

Calabash: Select a date from a UIDatePickerview

最后都变了- 提交于 2020-01-11 13:51:07
问题 In Calabash Automation testing on iPhone. I need to select a date from a date picker. Please guide me with a ruby step definition. I want something like Then I scroll datepicker to date "2002-10-22" 回答1: I made a solution after some research. This code is not bulletproof but it works fine for me. I guess someone will get a help from this. if anyone knows how to improve this. please add it here. In step definitions I add.. Then /^I scroll datepicker to date "1985-01-01" # Date Format "1985-01

Calabash Android: how to send app to the background (simulate device/hardware Home button)?

喜你入骨 提交于 2020-01-11 12:59:06
问题 Is there a way in Calabash Android where I can send my app to the background? In other words, simulate the device/hardware Home button? Secondly, can the app be brought back into the foreground? 回答1: This can be done in the following way: Then /^I go home$/ do system "#{default_device.adb_command} shell input keyevent KEYCODE_HOME" end P.S. You can also add sleep <some_value_in_seconds> if necessary, after system "..." line. 回答2: As far as I know, that action does not currently exist. You can

How to pass in timeout for cucumber command as in start_test_server_in_background(:timeout => 30)

 ̄綄美尐妖づ 提交于 2020-01-05 20:01:03
问题 After digging around for a few days for the launch issue, I found out if I use start_test_server_in_background(:timeout => 300) the app will be fully launched successfully. So for calabash command, the question become, how to pass in the timeout for cucumber command line? I tried the following for cucumber version 0.9.167 and it's not working. $ CONNECT_TIMEOUT=300 DEBUG=1 CALABASH_FULL_CONSOLE_OUTPUT=1 cucumber 回答1: CONNECT_TIMEOUT <== controls how long to wait for the server to respond to

Calabash Android: Is there a special perform_action command for pressing the search button on the Android keyboard

筅森魡賤 提交于 2020-01-03 02:31:09
问题 The command perform_action('send_key_enter') sends the enter key but for our search field, the enter key is replaced by the search key in the Android keyboard. Is there a special perform_action command to send the input of the search key? 回答1: What could be happening is your scripts aren't able to accurately locate ADB in order to send the command to the device. Try using the following, which uses default_device.adb_command - this should use the full path to ADB and also use the proper device

How to Add Calabash to React Native iOS for Xamarin.UITest

谁说我不能喝 提交于 2020-01-02 12:19:38
问题 How can I add the Calabash Framework to an iOS app built in React Native? We are moving the codebase of our iOS app from Swift to React Native, and I have an existing suite of UITests built in C# using Xamarin.UITest. I'd like to continue using my Xamarin.UITest suite for the React Native iOS app, but I know that Xamarin.UITest requires the Calabash framework to be linked in the app's source code. Xamarin has documentation on how to link Calabash for an iOS app built in Xcode, but I cannot

How to Add Calabash to React Native iOS for Xamarin.UITest

馋奶兔 提交于 2020-01-02 12:18:58
问题 How can I add the Calabash Framework to an iOS app built in React Native? We are moving the codebase of our iOS app from Swift to React Native, and I have an existing suite of UITests built in C# using Xamarin.UITest. I'd like to continue using my Xamarin.UITest suite for the React Native iOS app, but I know that Xamarin.UITest requires the Calabash framework to be linked in the app's source code. Xamarin has documentation on how to link Calabash for an iOS app built in Xcode, but I cannot

How to override a Calabash predefined step?

落花浮王杯 提交于 2020-01-02 07:06:28
问题 I'm defining custom calabash steps (to use on both iOS and Android) and would like to selectively override various predefined steps. An example is: Given /^I press the "([^\"]*)" button$/ do |text| tap_when_element_exists("android.widget.Button {text CONTAINS[c] '#{text}'}") end Instead of using this implementation, I would like to provide my own. If I define and use a step with a matching regex I get an error: Ambiguous match of "I press the "big red" button" It also suggests using "--guess"

Jenkins multiconfiguration project handle concurrent device usage

故事扮演 提交于 2020-01-02 04:39:08
问题 Case I have a Jenkins slave witch run's calabash tests on mobile devices (android, ios). To separate on which machines (the mac for iOS or Linux for Android) the tests is run, I also use the Throttle Concurrent Builds Plug-in . This way I separate between the Android or Mac Jenkins slaves the devices are hooked to. I use a mapping table and a self written bash script to call a device by name and execute a test on this specific slave. The mapping table map's the name to the device id (or IP

Unable to access WebView elements

别来无恙 提交于 2019-12-25 02:51:49
问题 I tried to access webView elements using Calabash-iOS using following query: query("webView css:'*'") But it is unable to detect the elements. When I touch any input field manually, it gets zoomed in and I am able to view the elements using the above query. Can I get any solution for this? 回答1: 1) First of all, make sure that you know the correct type of webview present in the app. Easiest way of specifying the webview element is by using the element class or the element's id. To get the

Calabash Android Looping through a ListView to check

情到浓时终转凉″ 提交于 2019-12-24 14:27:52
问题 I've just started using Calabash and have come across a listview. For each listview row I want to check the presence of some text and image view. However I'm unsure how can i loop through the listview? Something like foreach list_item in listview check text label with id check image view with id end Any help would be appreciated. 回答1: I am not sure about using foreach in this case, but you could do it based on index number in the list. Something like get count of item, then in a loop move