README.md in prickle-0.0.5 vs README.md in prickle-0.0.6

- old
+ new

@@ -30,12 +30,18 @@ ```ruby Prickle::Capybara.wait_time = 5 ``` -If you only want to extend the wait time for a particular feature, then you need to reset the wait time using *Prickle::Capybara = nil*. +If you only want to extend the wait time for a particular feature, then you need to reset the wait time using *Prickle::Capybara = nil* after your call.. +```ruby +Prickle::Capybara.wait_time = 5 +element(:href => "http://google.com").click +Prickle::Capybara.wait_time = nil # reset wait time +``` + ## Usage ### Find elements by any html tag(s) ```ruby @@ -66,10 +72,51 @@ element(:name => "flower").click element(:name => "flower").contains_text? "Roses" element(:name => "flower").has_text? "Anemone" # exact match ``` +### Popup + +**Selenium** + +```ruby +popup.confirm +popup.dismiss +popup.message + +popup.contains_message? "<text>" +``` + +**Webkit** + +```ruby +popup.confirm { + #block that triggers confirmation dialog +} + +popup.dismiss { + #block that triggers confirmation dialog +} + +popup.accept { + #block that triggers alert +} +``` + +Verifying popup messageo + +```ruby + +alert = popup.accept { + #block that triggers alert +} + +alert.contains_message? "<text>" + +``` + + ## Alternative syntax ### Find ```ruby @@ -86,19 +133,9 @@ ### Match text ```ruby div_contains_text? "text" #<element_tag>_contains_text? "text" -``` - -## Popup actions - -```ruby -confirm_popup # can be used for both confirmation boxed and alert boxes -dismiss_popup -popup_message - -popup_message_contains? "<text>" ``` ## Capturing screenshots Configure the directory where you want the screenshots to be saved