forked from richdownie/watircuke
-
Notifications
You must be signed in to change notification settings - Fork 1
gs/watircuke
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
INSTALL
First be sure to have installed Ruby(1.8.7) and RubyGems
Then install:
gem install geminstaller
Then checkout the WatirCuke git repo (if not yet done ;) ) and type
geminstaller config/geminstaller.yml
This will install all necessary gems.
Then install JSSH for FireWatir:
http://wiki.openqa.org/display/WTR/FireWatir+Installation
TextMate or Redcar editor snippets:
Any of the editors like TextMate or Redcar syntax recognition and snippets for Cucumber
http://github.com/bmabey/cucumber-tmbundle
To have WatirCuke support snippets just unpack the WatirCuke.tmbundle.zip which is in my github in TextMateBundles repo and place it in
TextMate:
~/Library/Application Support/TextMate/Bundles
Then in TextMate -> Bundles -> Bundle Editor -> Reload Bundles
Redcar:
~/.redcar/Bundles/
Snippets should work for .feature files.
Below are currently supported sentences:
Actions:
link[tab] I click the "some" button
checkbox[tab] I click the "some" checkbox
image[tab] I click the "some" image
link[tab] I click/onmouseover the "some" link (with alert)
radio[tab] I click the "some" radio button
table[tab] I click row "some" in the "some" table
list[tab] I select "some" from "from list"
tf[tab] I fill in the text field "text field name" with "some text"
df[tab] I fill in the date field "text field name" with "*fraze" *from http://chronic.rubyforge.org/ are supported
ff[tab] I fill in the file field "file field name" with "file path"
div[tab] I click the "some" div
*screenshot[tab] I take a screenshot
debug[tab] I debug
refresh[tab] I refresh the page
Check results:
check_image[tab] Then I should see the "some image" image
check_span[tab] Then I should see the span "some class" with "some text"
check_sentence[tab] Then I should (NOT )?see the sentence "some sentence"
check_text[tab] Then I should (NOT )?see the text "some text"
check_all[tab] Then I check all objects (this will dump all page objects to file)
Paths redirection:
red[tab] I am redirected to "some"
on[tab] I am on the "server" page
goto[tab] I go to "some url"
sleep[tab] I sleep for "some"
sleepu[tab] sleep until I see the text "text"
tag @new_feature - putted above the scenario will force watircuke to make a screenshot after each action.
Configuration:
Configuration is kept in the config/config.yml file
- You can specify running browser using one of : ie, firefox, chrome, safari
browser: ie
- **Fixtures/Language files separated with " " (files which contains translations without the .yml extension)
fixtures: login logout
- true / false for check for missing translation
check_translation: true
- Only will work if above check_translation is set to true.
Below is a template for regexp which will look after each scenario for missing translations ie: @
translation_tag: "@[0-9a-zA-Z]+_[0-9a-zA-Z]+" - this will match every string on page which fits to template
How to run:
1) WatirCuke can be run with tags like:
./WatirCuke.rb @tag1,@tag2 output
2) Can be run with feature files:
./WatirCuke.rb features/file.feature output
All above will produce the html output and move it into test_results folder
3) WatirCuke can be run with standard CUCUMBER : cucumber -t @tags -f format -o output
*screenshot - will be dropped in test_results/test_datetime/screenshots/ - this structure is created each time cucumber is being run
** Fixtures/Language files can be dropped into : 'features/fixtures' path.
They need to be in YML format like:
login:
login_button: Sign up
Then in scenario you have to use it like:
I click the ":login.login_button" button
That will import the value from attached fixture file.
***cukewatir maximizes the Gherkin speak and minimizes the Watir code.
License:
MIT About
The First Cross-Browser, HTML Element Agnostic, Automated Ruby Testing Framework
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Ruby 100.0%