# Appium/WebdriverIO, how to use ~ accessibility selector on the Web?

**URL:** <https://discuss.appium.io/t/appium-webdriverio-how-to-use-accessibility-selector-on-the-web/37846>\
**Category:** Support\
**Created:** [November 21, 2022, 5:48pm UTC](https://discuss.appium.io/t/appium-webdriverio-how-to-use-accessibility-selector-on-the-web/37846 "2022-11-21T17:48:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kopax](https://discuss.appium.io/user_avatar/discuss.appium.io/kopax/32/10638_2.png) [@kopax](https://discuss.appium.io/u/kopax)\
**Post date:** [November 21, 2022, 5:48pm UTC](https://discuss.appium.io/t/appium-webdriverio-how-to-use-accessibility-selector-on-the-web/37846/1 "2022-11-21T17:48:36Z")

</div>

Hello,

I have a iOS, Android and Web application that share the same code base (using react-native and react-native-web), I want to share the codebase of our e2e tests at the best possible.

After reading the accessibility id selector here: [https://webdriver.io/docs/selectors/#accessibility-id](https://webdriver.io/docs/selectors/#accessibility-id)

I was able to use `$('~MyButton')` to click on my button for both iOS and Android.

Can the Accesibility ID selector work also on the Web?

If yes, what attribute should I use on my element as I don’t think web use an accessibilityId attribute.

If no, what strategy do you recommend to prevent having to maintain many selectors for each platforms?

Thanks!
