cheezy / page-object

Gem to implement PageObject pattern in watir-webdriver and selenium-webdriver
MIT License
653 stars 220 forks source link

Frame locators that contain { visible: true } blow up #498

Closed justjoehere closed 3 years ago

justjoehere commented 3 years ago

When using the in_frame(visible: true) &block style approach, Page Object is incorrectly converting true into 'true' This is resulting Watir blowing up saying it expects TrueClass or FalseClass.

The code causing the issue is located in PageObject::Platforms::Watir::PageObject#nested_frames:1077 module PageObject module Platforms module Watir class PageObject def nested_frames(frame_identifiers)

The solution that seems to work is add checks for TrueClass and FalseClass, similar to the line that checks for Integer.

justjoehere commented 3 years ago

I have a fix, but cannot push a branch. How do we get access to push a branch and issue a pull request?

titusfortner commented 3 years ago

You need to fork the project, push the change to a new branch on your fork, then make a PR from that.

justjoehere commented 3 years ago

Issued PR#499. I attempted to create some tests, but I'm not sure how to mock frames to do so. The code change itself is straight forward. If I can get some guidance on how to create iframe tests, I'm happy to add some for this. I did not see any iframe tests in the repo.

justjoehere commented 3 years ago

PR merged