TestWise IDE

Next Generation Functional Testing Tool

Snippets   Screencast: Snippets Demo

Snippets in TestWise IDE are little bits of text (abbrev.) that expand full test script statements. For example,

pssi         page_source.should_include("TEXT")

How to insert a snippet?

1. Method 1: Type the abbrevs. and tab key

Like the example above.

2. Method 2: Press ‘Ctrl+J’ and select from the list

Snippets List

Abbrev. Expanded Script
aa after(:all) do

end
ae after(:each) do

end
asbp assert_button_present(“BUTTON_TEXT”)
ascb assert_checkbox_checked(“CHECKBOX_NAME”)
asex assert_exists(:tag, :element_id)
ash assert_hidden(:tag, :element_id)
aslnp assert_link_not_present_with_text(“LINK_TEXT”)
aslp assert_link_present_with_text(“LINK_TEXT”)
asnex assert_not_exists(:tag, :element_id)
asrb assert_radio_option_checked(“RADIO_NAME”, “RADIO_VALUE”)
assl assert_select_label(“LABEL”)
assvp assert_select_value_present(“LABEL”)
ast assert_title(“PAGE_TITLE”)
astnp assert_text_not_present(“TEXT”)
astp assert_text_present(“TEXT”)
asv assert_visible(:tag, :element_id)
ba before(:all) do

end
be before(:each) do

end
case test_case “Enter your test case description” do

end
cb click_button(“BUTTON_TEXT”)
cbi click_button_with_id(“BUTTON_TEXT”)
cbimg click_button_with_image(“IMAGE_SRC”)
cbr close_browser
ccb check_checkbox(“FIELD_NAME”, “VALUE”)
changed # CHANGED
cl click_link(“LINK_TEXT”)
cli click_link_with_id(“LINK_ID”)
clt click_link_with_text(“LINK_TEXT”)
context context “YOUR SPEC CONTEXT” do
include RWebUnit::RSpecHelper

end
crb click_radio_button(“FIELD_NAME”, “OPTION_VALUE”)
def def
end
ep expect_page
et enter_text(“FIELD_NAME”, “VALUE”)
fixme # FIXME
fs failsafe{ }
gp goto_page(“URL”)
if if
end
it it “NEW_BEHAVIOUR” do

end
loud logout unless debugging? # define logout in test_helper.rb
obr open_browser # defaut to $BASE_URL set in test_helper.rb or configured env url
obrw open_browser_with(“URL”)
parentdir File.expand_path(File.join(File.dirname(FILE ), ‘..’))
pssi page_source.should include(“TEXT”)
pssni page_source.should_not include(“TEXT”)
ptse page_title.should == “My_Title”
ptsi page_text.should include(“TEXT”)
ptsni page_text.should_not include(“TEXT”)
repeat repeat_try() { }
scenario scenario “NEW_SCENARIO” do

end
so select_option(“OPTION_NAME”, “OPTION_VALUE”)
spec specification “YOUR SPECIFICATION” do
include RWebUnit::RSpecHelper

end
specify specify “NEW_BEHAVIOUR” do

end
story story “NEW_STORY” do

end
suite suite “ENTER YOUR SUITE DESCRIPTION HERE” do
include RWebUnit::RSpecHelper

end
test test “Enter your test case description” do

end
todo # TODO
try try{ }
ucb uncheck_checkbox(“FIELD_NAME”, “VALUE”)
ud unless debugging?
wb button(:name, “BUTTON_NAME”).click
wbhsi browser.html.should include(“HTML”)
wbi button(:id, “BUTTON_ID”).click
wbtsi browser.text.should include(“TEXT”)
wcb checkbox(:name, “CHECKBOX_NAME”).set
wcbi checkbox(:id, “CHECKBOX_ID”).set
wl link(:text, “LINK_TEXT”).click
wli link(:id, “LINK_ID”).click
wrb radio(:name, “RADIO_BUTTON_NAME”, “OPTION_VALUE”).set
wrbi radio(:id, “RADIO_BUTTON_ID”, “OPTION_VALUE”).set
wtf text_field(:name, “TEXT_FIELD_NAME”).set “TEXT
wtfi text_field(:id, “TEXT_FIELD_ID”).set “TEXT