getOrientation method not available with java client 8.0.0+ for appium WinAppDriver - appium

getOrientation method not available with java client 8.0.0+ for appium WinAppDriver.
ScreenOrientation orientation = winAppDriver.getOrientation(); used to work with java client v7, now any idea how to get the orientation

Related

Appium Automating hybrid apps

Hi I try to write my first test for an Ionic App and I cant figure out howto do, as the documentation seems to miss some information.
ionic:
I have created a pipeline that builds an APK and and IPA file
I can run those files in the emulators (Android & iOS)
Appium
The server runs, and can connect to the local running Android Emulator
I've create the node.js project as documented in the getting started guide
The following works too:
async function main () {
const client = await wdio.remote(opts);
await client.deleteSession();
}
Result:
[Instrumentation] OK (1 test)
[Instrumentation] The process has exited with code
But now the documentation seems to miss a step, as it starts with (Automating hybrid apps):
driver
.contexts().then(function (contexts) { // get list of available views. Returns array: ["NATIVE_APP","WEBVIEW_1"]
return driver.context(contexts[1]); // choose the webview context
})
How do I get a driver instance in JavaScript, based on the client instance?
Also I have an "async function main ()" now. Is there no pattern to write it like async function test_01, test_02, or more meaningful?

ADAL for Cordova - Assistance Getting Started

Hello: I'm trying to get started with the ADAL plug-in for Cordova. Having used the native libraries a few times, I thought this would be pretty straightforward but I ran into a bit of an issue.
First of all my environment is VS2017, and the plugin is ADAL for Cordova 0.10.1.
I've created what I believe is the most simplistic example of a connection, using my own client application specifics and the ones provided in their sample online (which is) included below. My authentication looks like:
function authenticate(authCompletedCallback, errorCallback) {
var authority = "https://login.microsoftonline.com/common",
redirectUri = "http://localhost:4400",
resourceUri = "https://graph.windows.net",
clientId = "a5d92493-ae5a-4a9f-bcbf-9f1d354067d3";
var authContext = new Microsoft.ADAL.AuthenticationContext(authority);
authContext.acquireTokenAsync(resourceUri, clientId, redirectUri).then(authCompletedCallback, errorCallback);
This is then called in onDeviceReady();
acquireTokenAsync is called but doesn't appear to return either success or failure and a quick Fiddler trace doesn't appear to show the call which makes me wonder if it is not a configuration issue with Cordova to begin with.
I have commented out the Content-Security-Policy metatag with similar results.
Thank you in advance for any guidance!
Edit
Okay, perhaps this is helpful. I noticed that on the Cordova Plugin Simulation tab (I am trying to run this in the simulator in Chrome). I am seeing a dialog box with error:
There is no handler for the following exec call:
ADALProxy.acquireTokenAsync(...
Also, seems to work on a connected Android Device, just not in the local Simulator
The plug-in for Cordova doesn't support to run on the browser platform. When we developer an Cordova app and want to test on the browser platform, we have to ensure that the app depends on support the browser platform.
For the ADAL plug-in for Cordova support the platform:
Android (OS 4.0.3 and higher)
iOS Windows (Windows 8.0, Windows 8.1,
Windows 10 and Windows Phone 8.1)
And for other kinds of plug-in you can check it via you the Cordova plug-in.

iOS app cannot connect to MobileFirst server

i created an hybrid application that should connect to the MFP and consume data.
When i try to connect to the Desktop Browser Application everything is fine and the app works. Same behaviour when i try the Mobile Web Application. BUT when i try to connect with the mobile native iOS application i could not connect and receive the following error (in the console):
2015-11-12 17:22:15.031 APPXYZ[6072:3089110] [FATAL] [NONE] Uncaught Exception: TypeError: WLJSX.Ajax.WLRequest.setConnected is not a function. (In 'WLJSX.Ajax.WLRequest.setConnected(false)', 'WLJSX.Ajax.WLRequest.setConnected' is undefined) at (compiled_code):3871
My specs:
MFP version 7.1.0.00.20151107-1653
Xcode 7.1.1
iOS deploy target 8.0
Transport security protocol is deactivated (Allow Arbitrary Loads -> YES)
I cannot confirm this claim.
Using the following, I create a blank new Hybrid app with the iPhone environment, that calls the WL.Client.connect method in wlCommonInit() and displays an alert with "success" or "failure" accordingly. I got "success". No errors in the Xcode Console.
Xcode 7.1.1
IBM MobileFirst Platform Studio 7.1.0.00-20151107-1647
If you are doing something different in your project, do let us know...
The solution of my problem was that i change the init calling sequence of my app. I called the wl specific functions to early. After changing the sequence my app runs perfectly.....
thx 4 help :)

IBM Worklight 6.1 - Adapter invocation failing in iOS 5 after upgrading to v6.1

We have developed a Worklight-based Hybrid application with Native pages as well. Our start page is a native page from which we are invoking an adapter.
After upgrading to Worklight 6.1, this adapter invocation is now always failing in iOS 5, however continues to function correctly in iOS 6 and iOS 7.
When the adapter invocation fails, it returns raw HTML as the response: Adapter Failure Response.
In Xcode Console this is the error we see:
[ERROR] Worklight: -[WLRequest requestFailed:]:338::Status code='404'
error='(null)' [ERROR] Worklight: -[WLClient
onInvokeProcedureFailure:userInfo:]:696::response string=HTML
returning from adapter
The same application in Worklight 6.0.0.x works OK in iOS 5, 6 and 7.
This sample application can be used to see the error.
From tests made, it appears that the adapter invocation fails only in iOS 5 because the request sent contains double-slashes whereas in iOS 6 and 7 it contains one slash.
This can be verified in Wireshark:
This is a defect
There is not applicable workaround
Once the defect is fixed, it will be available via IBM Fix Central, as well as in the PMR that your customer needs to open anyway to get this fixed.
Check your wlclient.properties file, especially wlServerContext property. Looks like you're trying to connect to invalid URL.

WCF Service issue in IOS on MAC OS

I have a WCF service that returns XML string that I am consuming from Xamarin.iOS on MAC OS but it is throwing NullReferenceException When Method that return XML is called . I checked while debugging and found that State and EndPoint is not getting created when I creating proxy as it is stated in screen shot below . But it is working fine in Android on Windows

Resources