Homec4science

WebMessage: adapt web tests to the new framework

Description

WebMessage: adapt web tests to the new framework

  • Adapts WebMessage web tests to the new web tests framework. (addresses #798)
  • Implements new class called 'InvenioWebTestCase' in order to build a helper library of useful web test functions like:
    • login
    • logout
    • find_element_by_name_with_timeout
    • find_element_by_link_text_with_timeout
    • find_element_by_id_with_timeout
    • find_element_by_xpath_with_timeout
    • find_page_source_with_timeout
    • element_value_test
    • page_source_test
    • choose_selectbox_option_by_label
    • choose_selectbox_option_by_index
    • choose_selectbox_option_by_value
    • fill_textbox
    • handle_popup_dialog
  • Adds "explicit waits" (using WebDriverWait as Selenium people recommend: 'http://seleniumhq.org/docs/appendix_migrating_from_rc_to_webdriver.html') and adds a new class called 'InvenioWebTestCaseException' in order to improve the search for elements on the page:
    • InvenioWebTestCaseException is thrown if an element is not found.
    • WebDriverWait waits up to 'timeout' seconds before throwing an 'InvenioWebTestCaseException' or if it finds the element will return it in 0 - timeout seconds.
  • It is recommended to run Selenium 2.7.0; higher versions are more unstable and may 'randomly' fail by timeouting from time to time.

Details

Committed
Tibor Simko <tibor.simko@cern.ch>Oct 18 2011, 18:36
Parents
R3600:08c165091bf2: WebSearch: CERN hack for Video grid display
Branches
Unknown
Tags
Unknown

Event Timeline

Tibor Simko <tibor.simko@cern.ch> committed R3600:6ff405046369: WebMessage: adapt web tests to the new framework (authored by Raquel Jimenez Encinar <raquel.jimenez.encinar@cern.ch>).Oct 18 2011, 18:36