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

Consolidate requests structs under WebDriverRequests #73

Closed tristanlabelle closed 1 year ago

tristanlabelle commented 1 year ago

Changes

Rationale

This is one further step towards clarifying the layering clear between:

It also makes it easier to see the list of requests structs we have implemented, and makes the Session and Element definitions clearer by being just a list of funcs for each supported operation.

jeffdav commented 1 year ago

This is awesome. This is the sort of thing I'm talking about when I say we should cleanup prior to open sourcing. Don't you feel a lot better about it now? I do!

Also: did you test this against BrowserWin? Just to make sure we didn't break stuff over there?

tristanlabelle commented 1 year ago

@jeffdav Yeah, I have had this API shape in mind for a while and it feels better!

Also: did you test this against BrowserWin? Just to make sure we didn't break stuff over there?

No, but this cannot immediately break BrowserWin thanks to https://github.com/thebrowsercompany/arc/blob/eeeaba1ff34884cecb44c64e0b50f805f69a6c2c/Apps/BrowserWin/Package.resolved#L170 . We might have to do some tweaks next time we update packages. Also, I have a few more improvements in mind ;)