Closed ccdredzik closed 3 years ago
The current design of Page-Object is very dependent on Watir.
The original design of Page-Object did have a large separation between the Selenium vs Watir support. However, this generated a lot of code duplication between Page-Object and Watir. Watir already wraps Selenium objects to provide a lot of easier to use methods. Page-Object's Selenium support basically did the same thing - ie wrap Selenium objects to provide the same functionality as Watir methods. As a result, the current design has been switched to take the Selenium object you provide, convert it to a Watir object and then use that in the Page-Object. For example, #wait_until
now just delegates to Watir's respective method.
Fair point, I wrote the above comment and then looked into watir more. I actually just moved our suite to watir ¯\_(ツ)_/¯
Hi,
Would it be possible to create separate gems like:
page-object-selenium page-object-watir
That would essentially require only one of the frameworks? I believe page-object doesn't require watir to work properly, so always requiring it pollutes the dependencies of a project.