Class: RWebUnit::WebTestCase

Inherits:
Test::Unit::TestCase
  • Object
show all
Includes:
Assert, Driver, Utils
Defined in:
lib/rwebunit/web_testcase.rb

Constant Summary

Constants included from Utils

Utils::WORDS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#days_before, #days_from_now, #interpret_value, #paragraphs, #random_boolean, #random_char, #random_digit, #random_number, #random_str, #random_string_in, #sentences, #today, #tomorrow, #value_in_range, #words, #yesterday

Methods included from Assert

#assert_button_not_present, #assert_button_not_present_with_text, #assert_button_present, #assert_button_present_with_text, #assert_checkbox_not_selected, #assert_checkbox_selected, #assert_equals, #assert_exists, #assert_hidden, #assert_link_not_present_with_exact, #assert_link_not_present_with_text, #assert_link_present_with_exact, #assert_link_present_with_text, #assert_nil, #assert_not, #assert_not_exists, #assert_not_nil, #assert_option_equals, #assert_option_not_present, #assert_option_present, #assert_option_value_equals, #assert_option_value_not_present, #assert_option_value_present, #assert_radio_option_not_present, #assert_radio_option_not_selected, #assert_radio_option_present, #assert_radio_option_selected, #assert_text_field_value, #assert_text_in_element, #assert_text_not_present, #assert_text_not_present_in_table, #assert_text_present, #assert_text_present_in_table, #assert_title_equals, #assert_visible, #fail

Methods included from Driver

#absolutify_url, #absolutize_page, #absolutize_page_hpricot, #ajax_wait_for_element, #allow, #attach_browser, #begin_at, #browser, #cell_with_id, #click_button_with_image_src_contains, #close_all_browsers, #close_browser, #contains_text, #context, #dump_response, #element_by_id, #element_text, #ends_with?, #enter_text_with_id, #expect_page, #failsafe, #firefox, #goto_page, #goto_url, #ie, #is_firefox?, #is_linux?, #is_mac?, #is_windows?, #label_with_id, #new_popup_window, #on, #page_source, #page_text, #page_title, #repeat_try, #save_current_page, #shall_not_allow, #span_with_id, #substitute_relative_path_in_src_line, #support_utf8, #symbol_to_sequence, #try, #use_current_browser, #wait_for_element, #wait_until

Methods included from Popup

#check_for_popups, #check_for_security_alerts, #click_button_in_javascript_popup, #click_button_in_popup_after, #click_button_in_security_alert_popup, #click_button_in_security_information_popup, #click_popup_window, #ie_popup_clicker, #prepare_to_click_button_in_popup, #start_checking_js_dialog, #verify_alert

Methods included from ITestPlugin

#connect_to_itest, #debug, #dump_caller_stack, #operation_delay

Constructor Details

#initialize(name = nil) ⇒ WebTestCase

Returns a new instance of WebTestCase.



19
20
21
22
# File 'lib/rwebunit/web_testcase.rb', line 19

def initialize(name=nil)
  super(name) if name
  @web_browser = WebBrowser.new
end

Instance Attribute Details

#web_testerObject (readonly)

Returns the value of attribute web_tester.



17
18
19
# File 'lib/rwebunit/web_testcase.rb', line 17

def web_tester
  @web_tester
end

Instance Method Details

#default_testObject



24
25
26
# File 'lib/rwebunit/web_testcase.rb', line 24

def default_test
  super unless (self.class == WebTestCase)
end

#open_browser(baseUrl, relativeUrl) ⇒ Object Also known as: open_ie



28
29
30
31
# File 'lib/rwebunit/web_testcase.rb', line 28

def open_browser(baseUrl, relativeUrl)
  context.base_url = baseUrl
  begin_at(relativeUrl)
end