How to Automate selecting values in a iOS PickerWheel with Ruby - ios

I have been automating an application with Ruby and the Cucumber Framework. I'm utilizing XCUITest for my iOS automation within this framework.
From what research I've done it appears as though I have to send text to the picker wheel for it to adjust to the wanted value. This is the code I've tried to use:
Then(/^I click on month"([^"]*)"$/) do |month_number|
find_element(xpath: "//XCUIElementTypePickerWheel[1]").adjustToPickerWheelValue("#{month_number}")
end
With this code my Cucumber framework calls the find_element method for that element and attempts to send the "month_number" value to a "adjustToPickerWheelValue" method.
The error I receive when I attempt to use this method is a standard noMethod error:
undefined method `adjustToPickerWheelValue' for #<Selenium::WebDriver::Element:0x007f802cda98d8> (NoMethodError)
Is there something special I need to do to call this method in my env.rb file? Right now I just have "appium_lib" as required. Is there an XCUITest library I need to be utilizing as well?
Any and all help would be greatly appreciated. I'm very new to automating iOS. Thanks for reading and I hope to hear from you soon.

The method for xcuitest is
select_picker_wheel(element:, order:, offset: nil)

Related

Codeceptjs swipe function

Im just working with codeceptjs and using appium driver for testing android application.
Now i have different issues with this framework. Im currently working for a test, where i have to use swipeLeft, but it isnt working, there is nothing happen when that function is calling, also swipe, swipeRight, swipeUp, swipeDown. Has anyone already solved this problem or can i use alternatively a back() function or something?
Use the following syntax to make your code work:
I.executeScript('mobile: swipe', {direction: 'left'});
Have you consider Touch Perform (or Action) ? It is working for me
I have used webdriverio and it seems like Codeceptjs have similarities with their implementations of appium methods for mobile automation.
Are you testing using Android or iOS device?
Have you tried using different method overrides for Swipes?
On my experience, iOS and Android have different Speed and Offset settings you need to adjust the values until you get the swipe action working.
And of course you need to make sure you are selecting the appropriate View/Slider/Element that is scrollable, otherwise swipe will fail.
https://codecept.io/helpers/Appium

MergExtDropBox Livecode Can't find handler

Trying to use MergExtDropBox for the first time in Livecode for iOS. I've copied the external into the Copy Files pane but I'm getting a "Can't Find Handler" error when I try to run mergDropboxSetup.
It's most likely that there's some issue with the way you have added the external to your app. Take a look at this video where I explain how to do that
EDIT
Based on the comments I'm not sure this is the most likely issue. I'm wondering if you are executing the command on desktop instead of iOS? If that's the problem then you will need to wrap your code in something like this:
if the platform is "iPhone" then
mergDropboxSetup ...
end if

Automate kendoUI upload control using codedUI test framework

When using codedUI as automation test framework to testapplication I am facing an issue with KendiUI upload control.
Issue: I record and playback the event of uploading a file from the UI developed using KendoUI upload control, but the automation framework doesn't show the progressbar indicating file uploaded, it shows the progressing icon for ever.
How do I get resolve of this
However it works fine when I manually try to upload the file, within secs its shows the progress bar and check mark appears indicating file has been uploaded.
I experienced same issue but with help of Microsoft CodedUI support I was able to resolve this issue.
In the test method where you are trying to perform some functions like file upload etc using ajax related controls disable the WebWaitForReadyLevel. Please paste the below line of code in start of your test method
ConfigurationManager.AppSettings["WebWaitForReadyLevel"] = "3";
which will actually disable it.
This disabling is at testmethod level so if you don't want to disable don't write any such code because by default WebWaitForReadyLevel is enabled.
Hope this helps.

Error: event.findElement is not a function while trying to create slider for my app

I m new at ROR.
In my app I need slider and I found this article.
http://woork.blogspot.com/2009/01/art-of-reusing-code-in-your-web.html
But it is giving following error:
"event.findElement is not a function.
var element = event.findElement(this.selector); "
in prototype.js.
Can anybody tell me why this error is coming??
I think that article is based on the javascript framework MooTools, and maybe you have not downloaded Mootools or you dont have it inside your Rails app. Download it from http://mootools.net/
Maybe searching for "Rails mootools tutorial" will give you some basics on this also so you can understand better what's going on.

UIWebView Expose Objective C to JavaScript

How would I expose an Objective-C method within JavaScript when using the iPhone SDK when using the UIWebView?
Any help would be appreciated!
The best way to do this would be through a custom link, and then use the UIWebView delegate method -webView:shouldStartLoadWithRequest:navigationType: to trap requests. When you see a request come through with your link in it, you know your action has been triggered.
There is an example application in the QuickConnectiPhone framework that shows you how to do this.
QuickConnectiPhone also gives you a JavaScript function called 'makeCall'. You pass it a command and an array of parameters and it will pass them to the Objective-C side of your app for handling. You can then make your function call.
You can find it here on Sourceforge.
To see an example of this check out the PhoneGap source code from Github:
http://github.com/sintaxi/phonegap/tree/master/iphone/Classes/GlassAppDelegate.m

Resources