Locator Strategy 'tag name' is not supported for this session

Hello, I am trying to locate an element on Android by its tag(it exists) and I get the following exception. What is this about?

org.openqa.selenium.InvalidSelectorException: Locator Strategy 'tag name' is not supported for this session
For documentation on this error, please visit: http://seleniumhq.org/exceptions/invalid_selector_exception.html

These are the capabilities:
platformName=Android
platformVersion=9
automationName=UiAutomator2
deviceName=emulator-5554

Which client is used? version? code?

UiAutomator2 does not support location by tags (since these are not visible to the accessibility framework). Try Espresso if you want to use them

1 Like

Ouch. Tried to switch to Espresso and I don’t know why, the app doesn’t start. I will investigate a bit and maybe open another issue if required :slight_smile:

Thanks for you answer.

1 Like

Hey, Hi
I too have the same could u please tell me how u have resolved the issue.

Have you get a solution I also face following issue and I spent almot two days but issue still present.