Class: RWebSpec::WebDriver::WebTestCase

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

Constant Summary

Constants included from Utils

Utils::WORDS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#allow, #days_before, #days_from_now, #failsafe, #interpret_value, #on, #paragraphs, #random_boolean, #random_char, #random_digit, #random_number, #random_str, #random_string_in, #repeat_try, #sentences, #shall_not_allow, #symbol_to_sequence, #take_screenshot, #today, #tomorrow, #try, #try_for, #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_disabled, #assert_enabled, #assert_equals, #assert_exists, #assert_hidden, #assert_link_not_present_with_text, #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_in_page_source, #assert_text_not_in_page_source, #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, #attach_browser, #basic_authentication, #basic_authentication_celerity, #basic_authentication_firefox, #basic_authentication_ie, #begin_at, #browser, #cell_with_id, #check_ie_version, #choose_file_dialog, #clear_popup, #click_button_with_image_src_contains, #close_all_browsers, #close_browser, #contains, #contains_text, #context, #default_dump_dir, #dump_response, #element_by_id, #element_text, #ends_with?, #enter_text_with_id, #expect_page, #find_element, #find_elements, #firefox, #goto_page, #goto_url, #ie, #is_firefox?, #is_htmlunit?, #is_ie?, #is_linux?, #is_mac?, #is_windows?, #label_with_id, #new_popup_window, #page_source, #page_text, #page_title, #perform_operation, #quit, #save_current_page, #select_file_for_upload, #span_with_id, #substitute_relative_path_in_src_line, #support_utf8, #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 TestWisePlugin

#check_for_pause, #connect_to_testwise, #debug, #dump_caller_stack, #notify_screenshot_location, #operation_delay

Constructor Details

#initialize(name = nil) ⇒ WebTestCase

Returns a new instance of WebTestCase.



22
23
24
25
# File 'lib/rwebspec-webdriver/web_testcase.rb', line 22

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.



20
21
22
# File 'lib/rwebspec-webdriver/web_testcase.rb', line 20

def web_tester
  @web_tester
end

Instance Method Details

#default_testObject



27
28
29
# File 'lib/rwebspec-webdriver/web_testcase.rb', line 27

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

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



31
32
33
34
# File 'lib/rwebspec-webdriver/web_testcase.rb', line 31

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