Connection issue for iOS Automation

Mobile Testing, Android App Testing.
sub2401
Posts: 4
Joined: Mon Jun 22, 2020 6:55 pm

Connection issue for iOS Automation

Post by sub2401 » Mon Jun 22, 2020 7:06 pm

I am struggling to execute my test suit as a whole. Currently I have 34 test cases in suit.
When all test cases run well individually, it does not run as suit well.

After certain test cases, the mobile device gets disconnected. and throws the below mentioned error:
Device WaitFor(DeviceConnected) timed out. ConnectTimeout: 00:01:00 (Attached the Screenshot)

I have tried increasing the Connection Time out to 3 mins, but that does not work as well, After certain point of time the test cases starts failing because device lost the connection.

Kindly help me on this, as I am dead stuck on this unable to move forward with this issue.

Here I am attaching screenshot of the failure.

Kindly help me with the probable reason for it.
Test Environment details:
RxStudio version: 9.3.2.
RxService app Version: 3.2.0 (Installed by Instrumentation wizard)
iOs Version: 13.2
Device: iPad-6th Gen.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6036
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Connection issue for iOS Automation

Post by odklizec » Tue Jun 23, 2020 10:20 am

Hi,

Are you experiencing the same issue both with USB and WIFI connection?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

sub2401
Posts: 4
Joined: Mon Jun 22, 2020 6:55 pm

Re: Connection issue for iOS Automation

Post by sub2401 » Tue Jun 23, 2020 11:38 am

Currently I am trying with USB only. And it appears Randomly.
I will let you know after trying using wifi.

Thank you,
Subhadip

sub2401
Posts: 4
Joined: Mon Jun 22, 2020 6:55 pm

Re: Connection issue for iOS Automation

Post by sub2401 » Wed Jun 24, 2020 12:34 pm

I am running the scripts using Wifi connection now.
And I have seen the performance better.

But,For some cases I am still facing the same issue. The Report does not show the same error. But it shows the below error

Element for item 'FieldName' does not exist (Failed to find item 'Element'. No element found for path 'path' at step 'appName' after 2 attempts within 1.5m.).

Note: we have WebView in that page where this error occured.

Kindly help.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6036
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Connection issue for iOS Automation

Post by odklizec » Wed Jun 24, 2020 12:43 pm

Hi,

"No element found" usually means that the xpath behind the element in question is not correct. Typically, it contains some IDs or hardcoded indexes, which are no longer valid in runtime. What you can try is to add action "Create Snapshot" at places, where the test usually fails with this error and get snapshot of entire app. This may help you to analyze the app under test and see if the xpath, which usually fails, is indeed available in the AUT or not.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

sub2401
Posts: 4
Joined: Mon Jun 22, 2020 6:55 pm

Re: Connection issue for iOS Automation

Post by sub2401 » Wed Jun 24, 2020 5:39 pm

Thank you for your Quick Response.

For my test cases I am Closing the AUT in tear down of each test case.
And in some cases, when we encounter this issue, Ranorex looses control of the App, due to which it fails even to close the app.
And that results to failure of all test cases followed by it.

So, I wanted to know if there is any known event due to which the Ranorex looses the context of the App.

Thank you,
Subhadip

User avatar
N612
Posts: 135
Joined: Mon Jul 11, 2016 4:01 pm

Re: Connection issue for iOS Automation

Post by N612 » Tue Jun 30, 2020 10:17 pm

Disconnections are not expected. From my experience, wifi connections are more stable. Snapshots during runtime will likely help narrow down this issue. You can capture a snapshot of the root /mobileapp repository item in a test suite teardown if the point of failure is not predictable.