NatRitmeyer.com

An SDET's thoughts on test automation, TDD, BDD, ruby, CI, devops and software development

SitePrism 2.5

SitePrism 2.5 is made up mainly of contributions from various people. From the HISTORY file:

  • added ability to select iframe by index – thanks to Mike Kelly
  • site_prism now does lazy loading – thanks to MrSutter
  • added config block and improved capybara integration – thanks to tmertens (and to LukasMac for testing it)
  • changed #set_url to convert its input to a string – thanks to Jared Fraser

Due to various lame excuses I’ve taken ages to get this version out so please forgive me.

To get an idea of the main functional changes, see the following sections of the ReadMe:

1
2
3
SitePrism.configure do |config|
  config.use_implicit_waits = true
end
1
2
3
4
5
6
7
8
9
10
class SearchResults < SitePrism::Page
  element :view_more, "li", text: "View More"
end

@results_page.<element_or_section_name> :text => "Welcome!"
@results_page.has_<element_or_section_name>? :count => 25
@results_page.has_no_<element_or_section_name>? :text => "Logout"
@results_page.wait_for_<element_or_section_name> :count => 25
@results_page.wait_until_<element_or_section_name>_visible :text => "Some ajaxy text appears!"
@results_page.wait_until_<element_or_section_name>_invisible :text => "Some ajaxy text disappears!"

Both changes supplied by tmertens, both changes being the last 2 gripes I hear from people about SitePrism :)

Thanks to LukasMac for his extensive testing of this version.

Finally, add your project or company to the Who is using SitePrism page. It would make my day!

Hope that helps!