karatelabs/karate

support for iOS and Android using appium

babusekaran opened this issue · 6 comments

⚠️ (As on Apr 2023) Please consider Mobile support as experimental. But we are very close and there are some teams that use Karate for simple use-cases. Please contribute code if you can.

Description:
iOS and Android UI automation capability in karate using appium server.

basic driver support for iOS and android automation extending karate's web driver implementation to interact with appium server.

proposing driver types:

      for Android: { type: 'android' }
      for iOS: { type: 'iOS' }

locator support: XPath, name, accessibility id and id by the prefix.
adding platform-specific locator strategies like class chain, predicate string for iOS and uiautomator for android can be added shortly once we come up with a prefix, and also if there are any others supported by appium.

dependencies needed for this integration to work:

  • appium (install using npm)
    npm install -g appium
  • xcode >7 for iOS automation
  • android studio (android SDK with an AVD is also sufficient)

sample work on Android:
KarateAppiumv4

great ! for now I'd like to keep type lowercase, so ios - can re-visit if needed

Need suggestion on prefix for platform-specific locator strategies,

platform prefix
(proposed)
means example
ios : -ios predicate string :name == 'OK' type == XCUIElementTypeButton
ios ^ -ios class chain ^**/XCUIElementTypeTable[`name == 'dataTable'`]
android - -android uiautomator -input[name=someName]

@ptrthomas does this looks fine?

@babusekaran yes we can start with this and revisit later

released 0.9.3

Hi @ptrthomas do we have any method in Karate framework to handle mobile screen swipe (vertical/horizontal) to verify push notifications. Where can i find it, please details if have any.

@Rajeshwarb mobile support is currently experimental until we get contributions to close some of the gaps. you can read + add your needs to this ticket: #2300