thebrowsercompany / swift-webdriver

A Swift library for communicating with WebDriver (Appium/WinAppDriver) endpoints
BSD 3-Clause "New" or "Revised" License
105 stars 3 forks source link

Rewrite WinAppDriver tests & refactor Keys #89

Closed tristanlabelle closed 1 year ago

tristanlabelle commented 1 year ago

Many of our tests were testing the target app more than WinAppDriver, for example testing that an app shows a popup instead of testing that the click request works. This change does a clean slate on tests such that the test methods now clearly correspond to WinAppDriver requests being tested, and which app is being tested is more of an implementation detail.

Sending keys proved tricky, but I figured out the webdriver logic for what is a key event vs a character event (see comments in the code), which lead to a new design in the form of a Keys class, and the ability to reliably type unicode strings. Yay!

Fixes #82