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

Is it possible to find elements in SitePrism fields with case insensitive values?

I've got the following element texts in two labels of an object I need to find with SitePrism: 'Correct date' 'correct date' Is it possible to find such an element by using a case insensitive expression in SitePrism? I was trying the following but…
mickael
  • 2,033
  • 7
  • 25
  • 38
0
votes
0 answers

Javascript is not working while testing with selenium, site_prism and capybara

I am writing specs with capybara and selenium . I am able to run all the tests successfully but i am running through an issue. Js is not working at all in all of the specs. Can anyone help me in finding the way of running javascript?
Awais Shafqat
  • 546
  • 6
  • 13
0
votes
2 answers

Get css selector from a Site Prism page object

Is there a way to get the css selector for a page object you defined in SitePrism? For instance if I have class myPageObject < SitePrism::Page ... element :my_element, '.my-element-class' ... end How could I use the selector in a test to get…
Ben Hare
  • 4,365
  • 5
  • 27
  • 44
0
votes
2 answers

How to access a cucumber CONSTANT in cucumber env.rb from a page object (siteprism) ruby class?

I'm defining a CONSTANT in my env.rb file in cucumber as: CONFIG = YAML::load_file("#{File.dirname(__FILE__)}/../../configs/config.yaml") Then I want to access values from that 'config.yaml' file, like CONFIG['url']. The problem I'm having is that…
mickael
  • 2,033
  • 7
  • 25
  • 38
0
votes
2 answers

Is there any benefit of defining radio buttons in a Page Object model (eg. SitePrism) rather than using Capybara directly?

I was using a cucumber/ruby/capybara/siteprism framework and implementing the test pages at present. I've reached a point where there are a lot of radio buttons (over 20) per page in several pages, and I was thinking if there's really any benefit in…
mickael
  • 2,033
  • 7
  • 25
  • 38
0
votes
1 answer

Unable to find a ReactModal as a section - ArgumentError: wrong number of arguments

SitePrism has been working great for my automation project until I needed to get a handle on a particular ReactModal object that works with straight capybara find command but not in SitePrism. I would really appreciate any help with this…
Khai Pham
  • 1
  • 1
0
votes
1 answer

Is it possible to click the Nth element with SitePrism?

I was just starting with SitePrism and I've got a site where elements get added dynamically to the page and don't have any kind of id, name, etc... the easiest I could think of is finding them by their 'text', eg. a CONTINUE button I was…
mickael
  • 2,033
  • 7
  • 25
  • 38
0
votes
2 answers

Unable to create new pages: uninitialized constant error with SitePrism page

There are a couple of similar questions but my issue seems different as I am basically copying a file that's currently working. I joined a team where the last person left a cucumber/ruby framework with the following set up: lib/pages/page1.rb where…
mickael
  • 2,033
  • 7
  • 25
  • 38
0
votes
0 answers

Chromedriver taking long time to load assets

I'm having sporadic failures in my automated test suite because certain assets on the page are taking a long time to load. Each time it's a different one, so my question is : does this seem like an issue with the app's configuration or with…
Andrew Allison
  • 1,122
  • 2
  • 13
  • 30
0
votes
1 answer

Capybara/Poltergeist can't find element by css selector

When I used selenium_webdriver and shows firefox, works fine; Now I migrate to headless browser, and configurate Poltergeist/PhantomJS in my automated tests, and not work's. Capybara / Poltergeist doesnt find elements anymore. I mapped my elements…
Jess
  • 53
  • 1
  • 1
  • 5
0
votes
0 answers

Unable to find css of a element , while using sections in siteprism

Code does not have any other error basic structure is shown ,stuck in using the basic feature of section under class Station_Drawer < SitePrism::Section element :dropdown1,"dropdown css" end class Radio_nav < SitePrism::Section section…
0
votes
1 answer

Need to get css selector from SitePrism WebElement in RUBY CAPYBARA?

I need to retrieve css selector from SitePrism WebElement inside my Automation Script. Below is a WebElement in SitePrism. element :fld_web_element, "#unique_id .some_class_name" If i want to retrive XPath from this webelement, i can do this below…
ASM
  • 709
  • 2
  • 8
  • 27
0
votes
2 answers

In SitePrism Capybara framework, why we create an object using @ symbol?

I am just trying to find out why i need to define it as instance variable? Why not local? I know @home can be shared across all step def methods. Without this is there any other specific reason? Please help me out to understand the reason other than…
ASM
  • 709
  • 2
  • 8
  • 27
0
votes
0 answers

execute script page capybara convert site prism

I'm trying to convert a working capybara code into site prism. photo_upload_page.execute_script("$('#dobpicker').val('1973-12-16')") Site prism file element :dobpicker, '#dobpicker', :val, '1973-12-16' Spec…
khoamle
  • 676
  • 2
  • 7
  • 21
0
votes
1 answer

Need help on clicking an element (Element is not clickable at point (62, 459)) - Capybara Ruby Selenium Automation

I am having below error message in my console while trying to click on a button element: unknown error: Element is not clickable at point (62, 459). Other element would receive the click: Here's my…
ASM
  • 709
  • 2
  • 8
  • 27