Using Selenium Webdriver Selectors in Appium ios

前端 未结 3 1246
说谎
说谎 2021-01-24 06:41

A project I\'m on is developing a web app at the same time as an ios app (for the same thing) and I\'m hoping to be able to use existing Selenium tests, but we\'re having troubl

3条回答
  •  悲&欢浪女
    2021-01-24 07:20

    You can create one object repository file which contains the locators for both WebApp and iOS app. Then you have to follow the below process

    1. Create WebDriver and AppiumDriver instances
    2. Use the relevant drivers for locating the elements in WebApp as well as iOS app. We can use both the drivers within a test case.

    Please note that, the way WebDriver and AppiumDriver identifies the elements will be different. For example, in WebDriver if an element is identified by using ID then similarly in AppiumDriver an element can be identified by using the findElementByAccessibilityId.

    Even though AppiumDriver uses the same logic which WebDriver uses, the method names will differ. Please find the link for all the methods used by AppiumDriver

    Hope this helps.

提交回复
热议问题