[iOS12][JS] Appium 1.9.1 loop when find webviews contexts

Hi all,
we have updated our platform to Appium 1.9.1 to allow test on iOS 12 (hybrid app builded with cordova) and our test automation architecture is composed by:

nodeJS + WebDriverIO + Appium + IWDP

The developed team (customer) has released a new version of this app to include iOS 12 support and when we start test automation to test no regression, Appium cannot complete correctly the switch on webview and start an infinite loop. Below the Appium Log:

_Page element JSON: _
_[debug] [iOS] No web frames found. _
_[iOS] Could not find any webviews yet, refreshing/retrying _
[debug] [iOS] Retrieving contexts and views

Below the Appium capabilities used on real iPhone7 device:

ios: {
    iphone7: {
      deviceName: 'iPhone7',
      // browserName: 'Safari',
      platformVersion: '12.0',
      platformName: 'iOS',
      automationName: 'XCUITest',
      wdaConnectionTimeout: '600000',
      app: app.ios.appUrl,
      **autoWebview: true,**
      noReset: true,
      showXcodeLog: true,
      startIWDP: true,
      // autoAcceptAlerts: true,
      useJSONSource: true,
      simpleIsVisibleCheck: true,
      preventWDAAttachments: true,
      xcodeOrgId: 'XXXX',
      xcodeSigningId: 'iPhone Developer',
      bundleId: 'XXX',
      udid: 'XXX',
    },

If “autowebview” is set to TRUE the loop appear, instead when is set to FALSE, we are able to debug the script and using the command “browser.contexts()”, the console output is:

>>>>>>>>>>>>>>>>>>> currentContext: { value: ‘NATIVE_APP’,
_ sessionId: ‘ab71d72e-689d-48ae-96ff-b363b5fdea64’,_
_ status: 0 }

Only NATIVE_APP found and I don’t know why. Nothing WEBVIEW is retrivied and automation cannot start.

So, can you help us to find where is the issue? Please write us if you need any other informations type, we collect directly from developed team (if requested) as soon as possible.

Thank you very much guys!

ta-spx

Check if IWDP can pick up your webview being executed separately. Make sure it is up to date as well.

We have just checked with another app that we used for test automation and the last one work fine with IWDP (we can see the DOM using IWDP and it is updated to the last version available).
But with the incriminated app the IWDP dev tool does not work.
I’m confused and I think that the problem may be in the development app and so what can I do to verify that this app is builded correctly otherwise there are some issue in cordova?
Thanks very much and let me know!