My test scenario is I have a native iOS app under test, if i click on one button, it should take me to the new message screen , where I have a standard message content, I can add contacts and send . After clicking on send I am automatically navigated back to my application under test.
Is this possible to automate this scenario using appium in iOS. Can we launch two app’s from one session?
There is no problem continue flow using existing opened driver.
I tried to inspect the + sign to add contacts or the send message arrow but I am not able to do it with appium inspector when the session is started with my app under test’s BUNDLE ID. I need to get the elements information to proceed further, do I have to inspect the message app separetly and then add those actions on elements in my code?
Use simple
System.out.println(driver.getPageSource());
Once you are on needed screen with your test.
System.out.println(driver.getPageSource()); works for messages screen, I get the elements but in another scenario the app takes me to add contact. In that case if i add the System.out.println(driver.getPageSource()); after navigating to the contacts screen I get the below error
2020-04-18 17:19:23.810275+0200 WebDriverAgentRunner-Runner[775:98311] Skipping source dump for ‘Window’ because its snapshot cannot be resolved
Error Domain=com.apple.dt.xctest.automation-support.error Code=5 “Error kAXErrorIPCTimeout getting snapshot for element {pid=801} {uid=[ID:9999 hash:0xbad5d40000000000]}” UserInfo={NSLocalizedDescription=Error kAXErrorIPCTimeout getting snapshot for element {pid=801} {uid=[ID:9999 hash:0xbad5d40000000000]}}
[Xcode] 2020-04-18 17:20:04.136808+0200 WebDriverAgentRunner-Runner[775:98311] Skipping source dump for ‘Window’ because its snapshot cannot be resolved
Can you tell me why?
Thanks
After referring the issue mentioned here
I deleted all the contacts and there were only one page of contacts and I could get the page source.
I think its the limitation of getting page source if we have lots of data and needs scrolling.
Large data on screen always was problem with iOS.