crystal-loot / selenium.cr

Selenium library for Crystal
https://crystal-loot.github.io/selenium.cr/
MIT License
24 stars 7 forks source link

Move browser-specific capabilities into their own classes #15

Closed matthewmcgarvey closed 3 years ago

matthewmcgarvey commented 3 years ago

Fixes https://github.com/matthewmcgarvey/selenium.cr/issues/14

The static typing was making it impossible to add to the hash anything other than string values. Ideally, I wish we had some sort of JSON type that had simple methods for users to add values into so that I didn't have to define every single property. The other alternative would be to provide a method and double splat the params so users could provide any option. To be honest, I don't have the interest in figuring out the API right now and I just wanted to get it working. I did provide a helper method to be able to create the session just by passing in args, though.