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
8
votes
1 answer

How do I extract the Selenium Element from a Capybara Element?

I am more familiar with Java and Selenium than Ruby and Capybara and SitePrism, so apologies if this question is rather thick. Selenium has a very useful class for managing Select tags, Selenium::WebDriver::Support::Select, which can be created by…
James Martineau
  • 951
  • 1
  • 13
  • 29
5
votes
2 answers

NoMethodError: undefined method `expect' when trying to use it within a SitePrism class

I've got a cucumber,ruby,siteprism project where we're using the 'rspec' gem to check expectations. This is included in our env.rb and used successfully in the step definitions. I was now trying to make some assertions in a SitePrism class but I am…
mickael
  • 2,033
  • 7
  • 25
  • 38
4
votes
1 answer

How to Print Browser console logs using Cucumber Ruby Automation?

Can you please help on printing the console logs generate in web browser for any errors in Cucumber Capybara Test Automation? I am using PhantomJS webdriver as below: Capybara::Selenium::Driver.new(app, :browser => :phantomjs, …
SaeeK
  • 217
  • 1
  • 4
  • 12
4
votes
1 answer

Wait for an image to load using Capybara SitePrism

How can I wait for an image to load using Capybara? Here's my app code: -- Image I have tried using the wait_for method using those class and img attributes with no luck. It never waited for…
SaeeK
  • 217
  • 1
  • 4
  • 12
4
votes
3 answers

How to add a section to a SitePrism page object dynamically?

I'm using SitePrism to test my web application. I have a number of classes that extend SitePrism::Page and a number of often-used HTML snippets are represented by matching classes extending SitePrism::Section class Login < SitePrism::Section …
toniedzwiedz
  • 17,895
  • 9
  • 86
  • 131
4
votes
2 answers

Page Objects Design: Is there a Javascript equivalent to Ruby gem "site_prism"

I'd like to know if there is a framework in Javascript (NodeJS) for Protractor which supports a clean way to define the Page Object Elements on a Page Object as site_prism does. I've already checked astrolabe but doesn't quite fit the purpose. This…
Leo Gallucci
  • 16,355
  • 12
  • 77
  • 110
4
votes
1 answer

How do I select an item from a drop down with Site Prism?

I have the following elements defined within a SitePrism page: element :type, "select[id='type']" elements :type_options, "select[id='type'] option" And in my cucumber step definitions I have the following code to select an item from the select box…
drooks
  • 41
  • 1
  • 2
3
votes
5 answers

Need to execute a step (each feature may have diff step) only once before a Cucumber feature file

I want to execute a specific step only once before each cucumber feature files. A cucumber feature files can have multiple scenarios. I don't want Background steps here which executes before each scenario. Every feature file can have a step (which…
ASM
  • 709
  • 2
  • 8
  • 27
3
votes
7 answers

Want to execute Background only once in Cucumber feature files for multiple scenarios

I Want to execute Background only once in each cucumber feature files for multiple scenarios. how can i do that in step files? Feature: User can verify........... Background: Given Enter test data for a specific logic Scenario: Verify…
SaeeK
  • 217
  • 1
  • 4
  • 12
3
votes
1 answer

Code complete Siteprism's elements in Rubymine

I am automating using Selenium, Capybara and siteprism. Using rubymine, I want to get code completion such that I can type @page. and get a list of the methods (this works) and a list of the elements and sections defined in the page object using…
theawesome
  • 313
  • 1
  • 3
  • 9
3
votes
1 answer

Using SitePrism with Rspec and Capybara feature specs

I recently discovered SitePrism via the rubyweekly email. It looks amazing. I can see its going to be the future. The examples I have seen are mostly for cucumber steps. I am trying to figure out how one would go about using SitePrism with…
Apie
  • 6,371
  • 7
  • 27
  • 25
2
votes
1 answer

How to have URI template with optional variable with path

I am using site prism to create an page object that has a possible 2 urls. Site_prism uses Addressable::Template, and this uses the URI template RFC 6570. The required page contains a list of elements, but can have none as well, and from this logic…
Ben_Slaughter
  • 256
  • 3
  • 10
2
votes
1 answer

Is there a way to generate an Array or Hash of Siteprism objects currently on a page

I'm still new(ish), to POM, but I've found the syntax and general structure quite strong, so now I'm looking to advanced techniques. I have a dynamic page, and for each of the sections I am running the following code/psuedo code if has_SECTVAR1? …
Luke Hill
  • 460
  • 2
  • 10
2
votes
1 answer

stale element reference: element is not attached to the DOM - Need to wait until element/ elements visible/enabled using SitePrism

I want to use use wait_until method until visible for my element. Currently i am using Siteprism method which is as below. Which is a built in Siteprism method but looks like its not performing well as intermittently it is throwing error (Object not…
ASM
  • 709
  • 2
  • 8
  • 27
2
votes
2 answers

Wait on a text to be appear in SitePrism Capybara Framework

I tried to wait on a text before perform any action by follows SitePrism URL https://github.com/natritmeyer/site_prism in this section>> "Methods Supporting Capybara Options". @page.wait_until__visible :text => "Some Text!!!" But i am…
ASM
  • 709
  • 2
  • 8
  • 27
1
2 3 4 5 6 7 8