Supported platforms

Learn which platforms Optics drives, what each one needs, and which keywords behave differently.

One test on a phone, a TV and a browser. Phones and browsers press the element itself. Tizen and webOS TVs have no touch, so their steps move the focus with remote keys.

Optics runs the same tests on phones, TVs, browsers and locked production devices. A driver controls the device, and element sources are the ways Optics looks at the screen. You pick both in config.yaml.

Support matrix#

PlatformDriverElement sourcesNotes
Androidappium (UiAutomator2)appium_find_element, appium_page_source, appium_screenshotNeeds the Appium server, adb, and a phone or emulator.
iOSappium (XCUITest)appium_find_element, appium_page_source, appium_screenshotNeeds a Mac with Xcode, and a simulator or a signed real device.
Android TVappium (UiAutomator2)appium_find_element, appium_page_source, appium_screenshotSame setup as Android. Move around with D-pad key numbers.
Samsung Tizenappium (platformName: TizenTV)appium_page_source, appium_screenshotRemote keys only. Touch and typing keywords fail with E0105.
LG webOSappium (platformName: LGTV)appium_screenshot, plus OCRRemote keys only. Touch and typing keywords fail with E0105.
Web (Playwright)playwrightplaywright_find_element, playwright_page_source, playwright_screenshotNo server. Installs and opens its own Chromium.
Web (Selenium)seleniumselenium_find_element, selenium_page_source, selenium_screenshotNeeds a WebDriver server or Grid. Chrome or Firefox.
Production devices (BLE + camera)blecamera_screenshot, plus OCR or image matchingTaps through a Bluetooth mouse and keyboard, and sees the screen through a camera.

Enable one driver and the element sources whose names start with that driver's name. The config.yaml reference lists every key, and the engines reference lists what each engine installs.

Choose a driver for web#

We recommend Playwright for most people. It needs no server, optics setup installs its browser for you, and it runs on your own machine.

Use Selenium when you already run a Selenium Grid, or need Firefox or a real Chrome on remote machines. It needs a WebDriver server running before each run. Test websites covers both.

What changes between platforms#

Between phones and browsers, only config.yaml changes. Your test cases, modules and keywords stay the same. To run a suite on another platform, copy the project and swap the driver and element sources.

TVs on Samsung Tizen and LG webOS are the exception. They have no touch screen, so Press Element and the typing keywords fail with E0105 there. Write those flows with Press Keycode steps that move the focus, such as Press Keycode,RIGHT and then Press Keycode,ENTER. Test TV apps shows the key names.

Element values usually do change, because each platform names things differently. Give an element one row per platform, and Optics tries each value in turn:

test_data/elements.csv
Element_Name,Element_ID
sign_in,//android.widget.Button[@text='Sign in']
sign_in,//XCUIElementTypeButton[@name='Sign in']
sign_in,Sign in

The last row is plain text, which works on any platform with a UI tree, and with OCR on any platform that takes screenshots. Define elements explains fallback values.

What doesn't work everywhere#

Most keywords work on every platform. These are the exceptions:

KeywordWhere it differs
Press Element, Enter Text, Swipe, Scroll and other touch or typing keywordsFail with E0105 on Samsung Tizen and LG webOS. Use Press Keycode with remote keys instead.
Press KeycodeTakes Android key numbers on Android and Android TV, remote key names on Tizen and webOS, and key names such as Enter on Playwright. Not supported on Selenium or iOS.
SwipeNot supported on Selenium. On Playwright it turns the mouse wheel.
ScrollUp and down only on Appium. Left and right are ignored.
Launch AppOpens a package or bundle id on Appium and a URL on Playwright. On Selenium it opens browserURL. Not supported on production devices.
Enter Text, Get TextFail in Playwright on Optics 1.10.5. See Test websites for the workaround.
XPath and UI-tree textNot available on production devices, which only have camera pictures. Use OCR and images.
Error detectionNeeds the page source, so it doesn't run on production devices.

The keyword reference lists each keyword's behavior per driver.

Platform guides#