Questions tagged [site-prism]

SitePrism is a simple, clean and semantic DSL for describing your site using the Page Object Model pattern, for use with ruby & Capybara in automated acceptance testing.

Introduction

SitePrism enables the use of the Page Object Model pattern when using Ruby and Capybara for browser-based acceptance testing. The API is simple and can be used to create a semantic representation of your site that aims to reduce the usual maintenance cost of maintaining a suite of browser tests.

Important Links

116 questions
0
votes
1 answer

When using site_prism, how do I properly set_url so that I can use the rspec .to be_displayed matcher?

My page model looks like this: class ViewPage < SitePrism::Page set_url "events{/event_id}/whosecoming" element :flash_messages, 'div#flash_messages' section :event_info, EventInfoSection, 'div#event' iframe :map_iframe, MapIframe, '#map' …
0
votes
2 answers

Capybara::ElementNotFound Exception when the element is constructed dynamically

In cases when we have a dynamic content population in a span tag, for e.g., .detail %label Sku: %span.#sku.detail= @deal.sku When the deal in the above example doesn't have sku associated, the span element in the html will be as below…
Santosh Sindham
  • 879
  • 8
  • 18
0
votes
1 answer

How to wait until an element disappears in Capybara?

Note: by the time I finished writing up this question, the solution presented itself, but maybe others may find this useful, or could offer alternatives. I have read the following articles: this…
cartoloupe
  • 63
  • 5
0
votes
1 answer

Site Prism: after creating Sections I get a Rack::File argument error deep in the gem code, am I using this wrong?

I get this error when attempting to run cucumber when the site_prism page model is using sections. I had done a simpler page without sections that worked just fine. Rack::File headers parameter replaces cache_control after Rack 1.5. You should…
0
votes
3 answers

uninitialized constant error with SitePrism page

I've added this to my spec_helper: require 'capybara' require 'capybara/dsl' require 'capybara/rspec' require 'selenium-webdriver' require 'site_prism' And my page is this: class AboutPage < SitePrism::Page end My rspec is this: require_relative…
True_Blue
  • 1,387
  • 2
  • 10
  • 13
0
votes
1 answer

Using SitePrism's page object elements to perform page assertions

I want to know if there's a way to perform a page.should assertion with a page object element directly, instead of giving the xpath or CSS selector string as a parameter. i.e.: Page class: class FooClass < SitePrism::Page element :action_select,…
0
votes
0 answers

First scenario is failing every time in Scenario Outline in Cucumber

Whenever I run my Feature file with HTML report as output file, then 1st scenario in Scenario Outline is failing everytime. But when I make the same Scenario Outline as first Scenario in the Feature file it is getting passed, but this will make my…
Srikanth
  • 265
  • 2
  • 8
0
votes
1 answer

How do I set the URL for a SitePrism::Page that might have a subdomain?

The infrastructure I'm working with originally handled the URLs the way the Site Prism documentation suggested: the domain was handled by setting Capybara.app_host, and the pages themselves called set_url with a relative path. It turns out that some…
James Martineau
  • 951
  • 1
  • 13
  • 29
0
votes
2 answers

Defining elements and locators with interpolation in site-prism?

do you happen to know if there is a way to define both elements and locators using string or symbol interpolation while using the site-prism gem? I'm trying to do something like this: 0.upto(@adults) do { element :"adult#{index}",…
adids
  • 137
  • 12
-1
votes
1 answer

Using capybara/rspec find elements/sections by selector with similar id

I want to create Page Objects using SitePrsim. Selector of element on page is in form 'service_id'. How to find all elements/sections in a single page where id is different but selector contains key word 'service_' ? I have tried: class…
Jakub Smolar
  • 81
  • 10
-1
votes
1 answer

Not able to print a generic msg using rspec with generic method in ruby cucumber

Using cucumber site-prism.I'm navigating to a page and wants to check all elements present on that page.I used this code but not able to print this generic message. "@sign_in" is the object of the class where i have defined all sign in…
1 2 3 4 5 6 7
8