crystal-loot / selenium.cr

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

Add support for additional location strategies #17

Closed bwilczek closed 3 years ago

bwilczek commented 3 years ago

This PR adds support for three additional element location strategies that are not part of WebDriver HTTP protocol, but are a "syntax sugar" provided by the client libraries for other programming languages.

The added strategies are id, name and class. They've been added only to find_*methods using Symbol (not the LocationStrategy). That's not to introduce additional complexity, and to leave the LocationStragegy consistent with the WebDriver protocol. This is a design decision that is easy to change if needed though.

As a sidenote: thanks for the great job on this project! It's a cornerstone of my Page Object Model shard: https://github.com/bwilczek/webdriver_pump, that you might want to check out.

matthewmcgarvey commented 3 years ago

I love it! Thanks for the addition!