Capybara integration with pearl page pages

Can I use page pearls and capybara to automate testing of Ruby on Rails? When I try to access the page object after running my test, I get the following error:

Unable to pick a platform for the provided browser (RuntimeError) 

This makes sense since I think I will have to pass the capybara browser instance to the page object, but not sure if anyone else has tried this before.

+7
source share
3 answers

There is a gem that allows you to use the page object template with capybara: SitePrism. Find it here: https://github.com/natritmeyer/site_prism

+6
source

There is currently no support for capybara, but it has been requested several times. Part of the problem is that the API was built on selenium and watir, which are much richer than capy, and that would be a very big task to build by adding this functionality to the pearl of the page-page to make capy behave the same.

Several times I thought about splitting the gem of the page into a β€œbase” form that would allow the use of capybara and an β€œextended” form that would add the extra features found in selenium and watir, but didn't see enough to require.

+3
source

https://github.com/andyw8/capybara-page-object looks like it began to exist in the last 8 months or so.

+1
source

All Articles