Locator Strategy 'css selector' is not supported for this session issue with appium

前端 未结 1 962
萌比男神i
萌比男神i 2020-12-20 01:43

Since I\'m new to mobile automation, I\'ve been trying to run simple activities using appium maven and eclipse. But When I try to run Calculator app opens but the elements a

1条回答
  •  南笙
    南笙 (楼主)
    2020-12-20 02:05

    Appium is not Selenium: they both implemented using JSON wire protocol and has similar APIs, but not the same ones:

    Supported locator strategies for Native android app:

    • id (resource-id View attribute);
    • accessbilityId (content-desc View attribute);
    • uiAutomator (better to read about UiSelector);
    • className (ui component type);
    • XPath.

    So you cannot use By.name locator strategy for Android driver session, it's not supported.

    To make it easy, I suggest using MobileBy in place of By in Appium native tests: you will get the proper options.

    0 讨论(0)
提交回复
热议问题