# Crosslocator — define a UI selector once, resolve it on every platform

**URL:** <https://forum.robotframework.org/t/crosslocator-define-a-ui-selector-once-resolve-it-on-every-platform/9775>\
**Category:** Libraries\
**Created:** [8 July 2026 14:04 UTC](https://forum.robotframework.org/t/crosslocator-define-a-ui-selector-once-resolve-it-on-every-platform/9775 "2026-07-08T14:04:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mastafungus](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/mastafungus/32/4409_2.png) [@mastafungus](https://forum.robotframework.org/u/mastafungus)\
**Post date:** [8 July 2026 14:04 UTC](https://forum.robotframework.org/t/crosslocator-define-a-ui-selector-once-resolve-it-on-every-platform/9775/1 "2026-07-08T14:04:17Z")

</div>

Hi all,

I released a small, dependency-free library for a recurring pain in cross-platform  
testing: maintaining the same locator for Android, iOS, iPadOS and Windows.

You define a selector once per platform, and crosslocator resolves the right one  
at runtime:

```python
from crosslocator import Locator

LOGIN = Locator(
    android="accessibility_id=login",
    ios="accessibility_id=login",
    windows='//Button[@Name="Log in"]',
    default="id=login",
)
LOGIN.resolve() # the right selector for the current platform

```

It works with pure Python (Appium) and Robot Framework (a small library exposing  
`Set Current Platform` / `Resolve Locator` keywords). It can also auto-detect the  
platform from the active Appium session. iPad falls back to iOS selectors, and a  
shared default covers the rest.

- Install: pip install crosslocator
- Source: [GitHub - julien-becheny/crosslocator: Define a UI selector once, resolve it on every platform (Android, iOS, iPadOS, Windows, web). For Appium, Robot Framework, or pure Python. · GitHub](https://github.com/julien-becheny/crosslocator)

It’s an early release (v0.2). Feedback and issues are very welcome — especially on  
the Robot Framework integration and the locator formats you’d like supported.

Thanks!
