Is it possible to test different apps (WhatsApp, Facebook, Twitter and YouTube) on a single iOS session, like how we do on Android using startActivity()

Hi All,

Need your help on below issue which I am facing on iOS.

I have a requirement to check if the apps (WhatsApp, Facebook, Twitter and YouTube) are working fine with a particular VPN. On Android, I tested this by using startActivity() to start the apps and test but I want to do the same on iOS. Not sure if we can do this on iOS because startActivity() method is not in IOSDriver. Hence, it would be of great help if you can let me know any similar method to do this.

Thanks in advance.

You can achieve this in iOS by reinitializing the capabilities above 9.2 version of iOS using XCUITest

@Mitesh_Agrawal … Thanks for the reply . I am new to iOS appium automation testing. Hence, please let me know if it is possible to test Social app like WhatsApp using Appium on iOS. Because I need to check if whatsApp/Facebook/YouTube is working fine.

Thanks

Yes it is possible to test apps like whatsapp on iOS above 9.2 version of iOS using XCUITest

@Mitesh_Agrawal… Please clear my below doubts.

  1. Is it mandatory to have a developer account in apple to test third party iOS apps like whatsApp/Facebook/Twitter etc. can you share steps or link to guide.

  2. Is it possible to test multiple social apps on iOS on a single session sequentially. If not, is there any workaround.

  3. It would be of great help if you can share any sample code to test any social app.

Thanks

@asifqa123 : Yes you can test multiple apps in single appium session and there’s no need for signing third party apps as well. You just need to provide bundleid of app you need to launch in appium’s desired capablities.
For getting bundle id’s, you can use “ideviceinstaller -l”.

1 Like

@Swapan_Chhabra Thanks a lot for the help, now I am able to run the test sequentially on a single session by following your suggestion.

Steps followed:
I tried getting the bundle id of the app by using “ideviceinstaller -l” but it went into some error then I finally got the bundle id by using the below steps.

  1. Copy the .ipa file and rename the extension to .zip. (So e.g. Pages.ipa will become Pages.zip)
  2. Unzip the zip file. You will get a new folder named like the zip file.
  3. Search for the file iTunesMetadata.plist in that new folder.
  4. Open the file with a text editor and search for softwareVersionBundleId.

After getting the bundle id’s I managed to run YouTube and WhatsApp sequentially by passing bundle id’s and app value through TestNG but I want to know how to reinitialize the capabilities in the code (I was using startActivity() for android but not sure how to do for iOS) so that my code is more flexible in that way.

Thanks a lot in advance.

Regards,
Mohammed Asif