In the last chapter, we saw that the boilerplate code generated by Appium Inspector had a bunch of lines that used the DesiredCapabilities class and passed a certain set of keys and values to the Appium server. In this chapter, we will take a detailed look at the following:
- Appium server arguments
- Desired capabilities for Android
- Desired capabilities for iOS
- iOS XCUITest related iOS capabilities
Before we take a dive in there, we will refactor the code written in the last chapter and introduce the concept of hooks before and after, which acts like setup and tear down and will take care of starting the Appium server programmatically and then stopping it.
In test automation with Appium, all the commands are executed in the context of a session. A session is initiated by a client with a server in ways either specific to Android or iOS and with...