I write Appium UI tests for my iOS app. Some of the tests have such workflow:
an app is sent to background
the user does "force touch" on the app's icon, until menu (shortcuts) appear
an app is launched from this shortcut
My environment:
Simulator iOS 13.2
appium 1.15.0
Appium Python Client 0.47
I've tried such code (Python), it doesn't do "force touch":
self.driver.background_app(-1) # this works: sends an app to backround
args = {'duration': 5, 'x': 200, 'y': 200}
self.driver.execute_script("mobile:touchAndHold", args) # this doesn't work: force touch on Home screen
(I've tried to adjust coords, e.g. (150,200), (260,400) - no app icon was pressed).
I've tried AppleScript, but all I can do now is to activate Simulator app. :)
What I've found but it's not working:
https://saucelabs.com/blog/how-to-automate-3d-force-touch-with-appium: in this post "press" command was used with "element" = AppName, but my selenium driver says "press" requires "x", "y", not "element"
https://developers.perfectomobile.com/display/TT/Using+iOS+3D+Touch: in this post, driver.executeScript("mobile:touch:tap", parms) is used, but my driver says there's no command "mobile:touch:tap":
selenium.common.exceptions.WebDriverException: Message: Unknown mobile command 'touch:tap'. Only scroll, swipe, pinch, doubleTap, twoFingerTap, touchAndHold, tap, dragFromToForDuration, selectPickerWheelValue, alert, setPasteboard, getPasteboard, source, getContexts, installApp, isAppInstalled, removeApp, launchApp, terminateApp, queryAppState, activateApp, viewportScreenshot, startPerfRecord, stopPerfRecord, installCertificate, startLogsBroadcast, stopLogsBroadcast, batteryInfo, deviceInfo, activeAppInfo, pressButton, enrollBiometric, sendBiometricMatch, isBiometricEnrolled, clearKeychains, getPermission, siriCommand commands are supported.
I've looked at XCUITestDriver documentation/code, e.g. https://github.com/appium/appium-xcuitest-driver/blob/master/lib/commands/execute.js, and can't see any 3D-touch related stuff.
So do you know:
1. how to automate 3D-touch on app icon in iOS Simulator?
2. How to check if it's supported by XCUITest-Driver?
3. Can it be automated by smth like AppleScript?
Thanks in advance :)
If you mean like https://i.stack.imgur.com/3Fo7v.png, you can open it like below.
(Ruby code)
# Long press 'Contacts' icon with W3C actions
el = #driver.find_element :name, 'Contacts'
action_builder = #driver.action
action_builder.move_to(el)
.pointer_down(:left)
.pause(action_builder.pointer_inputs[0], 2)
.pointer_up(:left).perform
https://appium.io/docs/en/commands/interactions/actions/ is the API.
You can find Python, too.
(iOS 13 does not provide '3D touch'. The feature has been long-press style)
I use the distriqt scanner ane and it works very vell on iOS. But with the similar app on Android it crashes the app immediately (while calling Scanner.service.startScan( options ))
I got follwing from logcat:
E/QCOM PowerHAL( 313): Invalid hint ID.
E/mm-camera-intf( 313): mm_camera_open: opened, break out while loop
E/InputDispatcher( 858): channel '2da9ab5b air.myfunnyappidcovered/air.myfunnyappidcovered.AppEntry (server)' ~ Channel is unrecoverably broken and will be disposed!
E/InputDispatcher( 858): channel 'e01d279 air.myfunnyappidcovered/com.distriqt.extension.scanner.zbar.ZBarScannerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
Any Idea? All permissions and permission-freatures are set. The AS-Code works, like the iOS-compile shows. Tested with the same result on different Android-devices.
We are facing an issue with the IE version 8 related to the barcode scanner.
The issue is, in the first scan of barcode in IE8, the scanner doesn’t return the CR suffix. We need to hit enter button manually and then when we scan the same barcode again and it is working fine. We are facing this issue only on the first scan in IE 8. In all other browser, the scanner is working fine.
We have written the code in .Net MVC framework to read the barcode scanner values.
Here is the code:
-------------------Knockout code----------------------------
self.PackageValidator = function (data, event) {
$("#success").hide();
$("#error").hide();
}
-------------------------HTML Code-----------------------
input id="packageIdentifier" data-bind="value: TransferClass.ProductIdentifier, event: { change: PackageValidator }" type="text"
Please let us know if anyone has any solution for this issue.
Regards,
Vipin Singhal
I have a bunch of buttons that opens the default map application and puts something in the users system clipboard. It works fine on Android tablets, but the Iphone does nothing when the button is clicked. Here is the code:
case "MapYummyYummy":
System.setClipboard( "1665 Stelton Rd Piscataway Nj 08901" )
_callURL = "geo: 40.4978922, -74.4488224";
var targetURL:URLRequest = new URLRequest(_callURL);
navigateToURL(targetURL);
break;
Does anyone know the equivalent for this that will work on Iphone devices? thanks!
Have you tried this setData method? (I have no experience with this one, but looks like a viable alternative).
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/Clipboard.html#setData()
iOS launch maps via URL reference:
http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html
Querying for a location:
http://maps.apple.com/?q=cupertino
setting a start and end for directions:
http://maps.apple.com/?daddr=San+Francisco,+CA&saddr=cupertino
Hope it works for ya (looked up not tested).
Hi blackberry developers,
I am implemented one application targeted to OS6 and above.
Here i am loading url which is contain some Indian (Gujarathi) language into the browserField.
Here My problem is that text displaying some devices correctly but not all.
it is showing text properly in Bold 9780 OS6, But Tourch 9800 OS7 is not showing properly.It is showing only Rectangular Boxes.
So i need to know that is my devise support gujarathi language are not first.
I am using some code to get list of available languages
Locale []loc1=Locale.getAvailableInputLocales();
for(int i=0;i<loc1.length;i++)
{
System.out.println("=====1: "+loc1[i].getLanguage()+"======"+loc1[i].getDisplayLanguage());
RichTextField rh1=new RichTextField("ISO: "+loc1[i].getLanguage()+"==name: "+loc1[i].getDisplayLanguage(),Field.FOCUSABLE);
add(rh1);
}
String []loc2=Locale.getISOLanguages();
for(int i=0;i<loc2.length;i++)
{
System.out.println("=====2: "+loc2[i]);
RichTextField rh2=new RichTextField("ISO: "+loc2[i],Field.FOCUSABLE);
add(rh2);
}
in both cases it is displaying as attachment.
And strange thing is that in both array's i am not finding any language named as "Gujarathi" or "gu(ISO code)". But perfectly displaying data on my 9780 but 9800 not showing.
So Here i want to know what is the reason behind this ?
1) If suppose my devise is supporting "Gujarathi" Language then why it is not showing it's name in Locale.getISOLanguages(); or Locale.getAvailableInputLocales();?
2)How can we know that current device can support required language language?
I also tried using desktop-manager--->Applications------->available languages even here also i am not finding anything related to indian languages
I need to give answer to Client that what is the reason behind this ?
I goggled for 12Hrs. But no use So i decided that you are my only hope?
Try Checking Localization Demo
http://docs.blackberry.com/en/developers/deliverables/33805/Localization_sample_app_files_1791764_11.jsp