Class: RWebUnit::WebTestCase

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#days_before, #days_from_now, #random_boolean, #random_char, #random_digit, #random_number, #random_str, #random_string_in, #today, #tomorrow, #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_element_not_present, #assert_element_present, #assert_equals, #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_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_in_element, #assert_text_in_table, #assert_text_not_in_table, #assert_text_not_present, #assert_text_present, #assert_text_present_in_text_field, #assert_title_equals, #fail

Methods included from Driver

#ajax_wait_for_element, #area, #attach_browser, #begin_at, #button, #buttons, #cell, #check_checkbox, #checkbox, #checkboxes, #clear_radio_option, #click_button_with_caption, #click_button_with_id, #click_button_with_image_src_contains, #click_button_with_value, #click_link_with_id, #click_link_with_text, #click_popup_window, #click_radio_option, #close_browser, #contains_text, #div, #dump_response, #element_text, #enter_text, #expect_page, #file_field, #form, #frame, #go_back, #go_forward, #goto_page, #h1, #h2, #h3, #h4, #h5, #h6, #hidden, #ie, #image, #images, #label, #li, #link, #links, #map, #new_popup_window, #on, #operation_delay, #paragraph, #pre, #radio, #radios, #refresh, #row, #select_file_for_upload, #select_list, #select_lists, #select_option, #shall_not_allow, #span, #submit, #table, #test_context, #text_field, #text_fields, #uncheck_checkbox, #wait_for_element

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_tester = WebTester.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)
  test_context.base_url = baseUrl
  begin_at(relativeUrl)
end