diff --git a/atest/README.rst b/atest/README.rst index a8cbf7f71..1e1919a11 100644 --- a/atest/README.rst +++ b/atest/README.rst @@ -82,7 +82,7 @@ from the `.travis.yam`_. Generally speaking the test are automatically run by using Chrome and Firefox browsers. The project uses Python 2.7, Python 3.4, Python 3.6 and PyPy 3.5 for test execution. The project uses and latest available Selenium 3 version for test execution. Test uses Robot Framework versions -2.9.2 and 3.0.2 for acceptance test execution. +2.9.2 and 3.0.4 for acceptance test execution. .. _browser driver: https://github.com/robotframework/SeleniumLibrary#browser-drivers .. _PATH: https://en.wikipedia.org/wiki/PATH_(variable) diff --git a/atest/acceptance/big_list_of_naught_strings.robot b/atest/acceptance/big_list_of_naught_strings.robot index 633c17f85..a308eab90 100644 --- a/atest/acceptance/big_list_of_naught_strings.robot +++ b/atest/acceptance/big_list_of_naught_strings.robot @@ -11,7 +11,6 @@ Big List Of Naughty Strings :FOR ${string} IN @{blns} \ Check Blns Error Check ${string} - *** Keywords *** Check Blns Error Check [Arguments] ${string} diff --git a/atest/acceptance/extending.robot b/atest/acceptance/extending.robot index a097c351a..742d80542 100644 --- a/atest/acceptance/extending.robot +++ b/atest/acceptance/extending.robot @@ -4,7 +4,6 @@ Suite Teardown ExtSeLib.Close All Browsers Resource resource.robot Library ExtSL.ExtSL WITH NAME ExtSeLib - *** Test Cases *** When Extending SeleniumLibrary Keywords With Decorated Name Can Be Used For Extending ${elements} = ExtSeLib.Ext Web Element //tr diff --git a/atest/acceptance/keywords/click_element_modifier.robot b/atest/acceptance/keywords/click_element_modifier.robot index 48963ad90..6c533b6b3 100644 --- a/atest/acceptance/keywords/click_element_modifier.robot +++ b/atest/acceptance/keywords/click_element_modifier.robot @@ -3,7 +3,6 @@ Suite Setup Go To Page "javascript/click_modifier.html" Test Setup Initialize Page Resource ../resource.robot - *** Test Cases *** Click Element Modifier CTRL Click Element Button modifier=CTRL diff --git a/atest/acceptance/keywords/content_assertions.robot b/atest/acceptance/keywords/content_assertions.robot index 4a9c02fbe..b78edcc1e 100644 --- a/atest/acceptance/keywords/content_assertions.robot +++ b/atest/acceptance/keywords/content_assertions.robot @@ -20,7 +20,6 @@ Location Should Be ... Location should have been 'non existing' but was 'http://localhost:7000/html/'. ... Location Should Be non existing message=None - Location Should Contain [Documentation] LOG 2:4 Current location contains 'html'. Location Should Contain html @@ -36,7 +35,6 @@ Location Should Contain ... Location should have contained 'not a location' but it was 'http://localhost:7000/html/'. ... Location Should Contain not a location message=None - Title Should Be [Documentation] LOG 2:4 Page title is '(root)/index.html'. Title Should Be (root)/index.html @@ -47,26 +45,36 @@ Title Should Be ... Page title was not expected ... Title Should Be not a title message=Page title was not expected - Page Should Contain - [Documentation] LOG 2:7 Current page contains text 'needle'. - ... LOG 4.1:14 REGEXP: (?i) + [Documentation] The last step fails and doesn't contain the html content. + ... FAIL Page should have contained text 'non existing text' but did not. + ... LOG 2:7 Current page contains text 'needle'. + ... LOG 3:7 INFO Current page contains text 'This is the haystack'. + ... LOG 4:14 FAIL Page should have contained text 'non existing text' but did not. Page Should Contain needle Page Should Contain This is the haystack - Run Keyword And Expect Error - ... Page should have contained text 'non existing text' but did not. - ... Page Should Contain non existing text + Page Should Contain non existing text -Page Should Contain with text having internal elements +Page Should Contain With Text Having Internal Elements Page Should Contain This is the haystack and somewhere on this page is a needle. Go to page "links.html" Page Should Contain Relative with text after -Page Should Contain With Custom Log Level - [Documentation] LOG 2.1:14 DEBUG REGEXP: (?i) - Run Keyword And Expect Error - ... Page should have contained text 'non existing text' but did not. - ... Page Should Contain non existing text DEBUG +Page Should Contain With Custom Log Level DEBUG + [Documentation] Html content is shown at DEBUG level. + ... FAIL Page should have contained text 'non existing text' but did not. + ... LOG 2:14 DEBUG REGEXP: (?i) + ... LOG 2:15 FAIL Page should have contained text 'non existing text' but did not. + Page Should Contain non existing text DEBUG + +Page Should Contain With Custom Log Level TRACE + [Documentation] Html content is shown at DEBUG level. + ... FAIL Page should have contained text 'non existing text' but did not. + ... LOG 3:15 TRACE REGEXP: (?i) + ... LOG 3:16 FAIL Page should have contained text 'non existing text' but did not. + Set Log Level TRACE + Page Should Contain non existing text TRACE + [Teardown] Set Log Level DEBUG Page Should Contain With Disabling Source Logging [Documentation] LOG 3:2 NONE @@ -81,12 +89,12 @@ Page Should Contain With Frames Page Should Contain You're looking at right. Page Should Not Contain - [Documentation] LOG 2:11 Current page does not contain text 'non existing text'. - ... LOG 3.1:10 REGEXP: (?i) + [Documentation] Default log level does not have html output. + ... FAIL Page should not have contained text 'needle'. + ... LOG 2:11 Current page does not contain text 'non existing text'. + ... LOG 3:10 FAIL Page should not have contained text 'needle'. Page Should Not Contain non existing text - Run Keyword And Expect Error - ... Page should not have contained text 'needle'. - ... Page Should Not Contain needle + Page Should Not Contain needle Page Should Not Contain With Custom Log Level [Documentation] LOG 2.1:10 DEBUG REGEXP: (?i) diff --git a/atest/acceptance/keywords/cookies.robot b/atest/acceptance/keywords/cookies.robot index d2a821fc9..4cfa9a476 100644 --- a/atest/acceptance/keywords/cookies.robot +++ b/atest/acceptance/keywords/cookies.robot @@ -5,7 +5,6 @@ Suite Teardown Delete All Cookies Test Setup Add Cookies Resource ../resource.robot - *** Test Cases *** Get Cookies ${cookies}= Get Cookies diff --git a/atest/acceptance/keywords/counting_elements.robot b/atest/acceptance/keywords/counting_elements.robot index f5561b6cc..8af339461 100644 --- a/atest/acceptance/keywords/counting_elements.robot +++ b/atest/acceptance/keywords/counting_elements.robot @@ -100,14 +100,12 @@ Page Should Contain Element When Limit Is Not Number ... Page Should Contain Element name: div_name limit=AA Page Should Contain Element When Error With Limit And Different Loglevels - [Documentation] - ... LOG 2.1:7 INFO REGEXP: .*links\\.html.* - ... LOG 3.1:7 DEBUG REGEXP: .*links\\.html.* + [Documentation] Only at DEBUG loglevel is the html placed in the log. + ... FAIL Page should have contained "99" element(s), but it did contain "2" element(s). + ... LOG 2.1:7 FAIL Page should have contained "99" element(s), but it did contain "2" element(s). + ... LOG 3:7 DEBUG REGEXP: .*links\\.html.* + ... LOG 3:8 FAIL Page should have contained "99" element(s), but it did contain "2" element(s). [Setup] Go To Page "links.html" Run Keyword And Ignore Error ... Page Should Contain Element name: div_name limit=99 - Run Keyword And Ignore Error - ... Page Should Contain Element - ... name: div_name - ... loglevel=debug - ... limit=99 + Page Should Contain Element name: div_name loglevel=debug limit=99 diff --git a/atest/acceptance/keywords/screenshot_element.robot b/atest/acceptance/keywords/screenshot_element.robot index 50aa8df2b..e33238317 100644 --- a/atest/acceptance/keywords/screenshot_element.robot +++ b/atest/acceptance/keywords/screenshot_element.robot @@ -3,7 +3,6 @@ Documentation Suite description Suite Setup Go To Page "links.html" Resource ../resource.robot - *** Test Cases *** Capture Element Screenshot [Setup] Remove Files ${OUTPUTDIR}/selenium-element-screenshot-1.png diff --git a/atest/run.py b/atest/run.py index 23ad3ca33..229b80557 100755 --- a/atest/run.py +++ b/atest/run.py @@ -52,19 +52,19 @@ # Folder settings ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) -ACCEPTANCE_TEST_DIR = os.path.join(ROOT_DIR, "acceptance") -UNIT_TEST_RUNNER = os.path.join(ROOT_DIR, '..', 'utest', 'run.py') -RESOURCES_DIR = os.path.join(ROOT_DIR, "resources") -RESULTS_DIR = os.path.join(ROOT_DIR, "results") -SRC_DIR = os.path.normpath(os.path.join(ROOT_DIR, "..", "src")) -TEST_LIBS_DIR = os.path.join(RESOURCES_DIR, "testlibs") -HTTP_SERVER_FILE = os.path.join(RESOURCES_DIR, "testserver", "testserver.py") +ACCEPTANCE_TEST_DIR = os.path.join(ROOT_DIR, 'acceptance') +UNIT_TEST_RUNNER = os.path.join(ROOT_DIR, os.pardir, 'utest', 'run.py') +RESOURCES_DIR = os.path.join(ROOT_DIR, 'resources') +RESULTS_DIR = os.path.join(ROOT_DIR, 'results') +SRC_DIR = os.path.normpath(os.path.join(ROOT_DIR, os.pardir, 'src')) +TEST_LIBS_DIR = os.path.join(RESOURCES_DIR, 'testlibs') +HTTP_SERVER_FILE = os.path.join(RESOURCES_DIR, 'testserver', 'testserver.py') # Travis settings for pull request -TRAVIS = os.environ.get("TRAVIS", False) -TRAVIS_EVENT_TYPE = os.environ.get("TRAVIS_EVENT_TYPE", None) -TRAVIS_JOB_NUMBER = os.environ.get("TRAVIS_JOB_NUMBER", "localtunnel") -SAUCE_USERNAME = os.environ.get("SAUCE_USERNAME", None) -SAUCE_ACCESS_KEY = os.environ.get("SAUCE_ACCESS_KEY", None) +TRAVIS = os.environ.get('TRAVIS', False) +TRAVIS_EVENT_TYPE = os.environ.get('TRAVIS_EVENT_TYPE', None) +TRAVIS_JOB_NUMBER = os.environ.get('TRAVIS_JOB_NUMBER', 'localtunnel') +SAUCE_USERNAME = os.environ.get('SAUCE_USERNAME', None) +SAUCE_ACCESS_KEY = os.environ.get('SAUCE_ACCESS_KEY', None) TRAVIS_BROWSERS = ['chrome', 'firefox', 'headlesschrome'] ROBOT_OPTIONS = [ @@ -91,7 +91,7 @@ def unit_tests(): sys.exit(failures) -def acceptance_tests(interpreter, browser, rf_options=[], +def acceptance_tests(interpreter, browser, rf_options=None, sauce_username=None, sauce_key=None): if os.path.exists(RESULTS_DIR): shutil.rmtree(RESULTS_DIR) @@ -125,7 +125,8 @@ def execute_tests(interpreter, browser, rf_options, sauce_username, sauce_key): options = [] runner = interpreter.split() + ['-m', 'robot.run'] options.extend([opt.format(browser=browser) for opt in ROBOT_OPTIONS]) - options += rf_options + if rf_options: + options += rf_options if sauce_username and sauce_key: options.extend(get_sauce_conf(browser, sauce_username, sauce_key)) command = runner diff --git a/src/SeleniumLibrary/base/librarycomponent.py b/src/SeleniumLibrary/base/librarycomponent.py index b3e8d4795..f386d2462 100644 --- a/src/SeleniumLibrary/base/librarycomponent.py +++ b/src/SeleniumLibrary/base/librarycomponent.py @@ -44,7 +44,7 @@ def log_source(self, loglevel='INFO'): self.ctx.log_source(loglevel) def assert_page_contains(self, locator, tag=None, message=None, - loglevel='INFO'): + loglevel='TRACE'): if not self.find_element(locator, tag, required=False): self.log_source(loglevel) if is_noney(message): @@ -55,7 +55,7 @@ def assert_page_contains(self, locator, tag=None, message=None, % (tag or 'element', locator)) def assert_page_not_contains(self, locator, tag=None, message=None, - loglevel='INFO'): + loglevel='TRACE'): if self.find_element(locator, tag, required=False): self.log_source(loglevel) if is_noney(message): diff --git a/src/SeleniumLibrary/keywords/browsermanagement.py b/src/SeleniumLibrary/keywords/browsermanagement.py index 191e978ed..a5b074531 100644 --- a/src/SeleniumLibrary/keywords/browsermanagement.py +++ b/src/SeleniumLibrary/keywords/browsermanagement.py @@ -296,8 +296,8 @@ def log_source(self, loglevel='INFO'): """Logs and returns the HTML source of the current page or frame. The ``loglevel`` argument defines the used log level. Valid log - levels are ``WARN``, ``INFO`` (default), ``DEBUG``, and ``NONE`` - (no logging). + levels are ``WARN``, ``INFO`` (default), ``DEBUG``, ``TRACE`` + and ``NONE`` (no logging). """ source = self.get_source() self.log(source, loglevel) diff --git a/src/SeleniumLibrary/keywords/element.py b/src/SeleniumLibrary/keywords/element.py index f6bcd04ee..2b69eb687 100644 --- a/src/SeleniumLibrary/keywords/element.py +++ b/src/SeleniumLibrary/keywords/element.py @@ -109,7 +109,7 @@ def element_should_not_contain(self, locator, expected, message=None, ignore_cas % (locator, expected_before)) @keyword - def page_should_contain(self, text, loglevel='INFO'): + def page_should_contain(self, text, loglevel='TRACE'): """Verifies that current page contains ``text``. If this keyword fails, it automatically logs the page source @@ -126,7 +126,7 @@ def page_should_contain(self, text, loglevel='INFO'): @keyword def page_should_contain_element(self, locator, message=None, - loglevel='INFO', limit=None): + loglevel='TRACE', limit=None): """Verifies that element ``locator`` is found on the current page. See the `Locating elements` section for details about the locator @@ -167,7 +167,7 @@ def page_should_contain_element(self, locator, message=None, raise AssertionError(message) @keyword - def locator_should_match_x_times(self, locator, x, message=None, loglevel='INFO'): + def locator_should_match_x_times(self, locator, x, message=None, loglevel='TRACE'): """Deprecated, use `Page Should Contain Element` with ``limit`` argument instead.""" count = len(self.find_elements(locator)) x = int(x) @@ -182,7 +182,7 @@ def locator_should_match_x_times(self, locator, x, message=None, loglevel='INFO' % (count, locator)) @keyword - def page_should_not_contain(self, text, loglevel='INFO'): + def page_should_not_contain(self, text, loglevel='TRACE'): """Verifies the current page does not contain ``text``. See `Page Should Contain` for explanation about the ``loglevel`` @@ -195,7 +195,7 @@ def page_should_not_contain(self, text, loglevel='INFO'): self.info("Current page does not contain text '%s'." % text) @keyword - def page_should_not_contain_element(self, locator, message=None, loglevel='INFO'): + def page_should_not_contain_element(self, locator, message=None, loglevel='TRACE'): """Verifies that element ``locator`` is found on the current page. See the `Locating elements` section for details about the locator @@ -865,7 +865,7 @@ def mouse_down_on_link(self, locator): action.click_and_hold(element).perform() @keyword - def page_should_contain_link(self, locator, message=None, loglevel='INFO'): + def page_should_contain_link(self, locator, message=None, loglevel='TRACE'): """Verifies link identified by ``locator`` is found from current page. See the `Locating elements` section for details about the locator @@ -878,7 +878,7 @@ def page_should_contain_link(self, locator, message=None, loglevel='INFO'): self.assert_page_contains(locator, 'link', message, loglevel) @keyword - def page_should_not_contain_link(self, locator, message=None, loglevel='INFO'): + def page_should_not_contain_link(self, locator, message=None, loglevel='TRACE'): """Verifies link identified by ``locator`` is not found from current page. See the `Locating elements` section for details about the locator @@ -918,7 +918,7 @@ def mouse_down_on_image(self, locator): action.click_and_hold(element).perform() @keyword - def page_should_contain_image(self, locator, message=None, loglevel='INFO'): + def page_should_contain_image(self, locator, message=None, loglevel='TRACE'): """Verifies image identified by ``locator`` is found from current page. See the `Locating elements` section for details about the locator @@ -931,7 +931,7 @@ def page_should_contain_image(self, locator, message=None, loglevel='INFO'): self.assert_page_contains(locator, 'image', message, loglevel) @keyword - def page_should_not_contain_image(self, locator, message=None, loglevel='INFO'): + def page_should_not_contain_image(self, locator, message=None, loglevel='TRACE'): """Verifies image identified by ``locator`` is found from current page. See the `Locating elements` section for details about the locator @@ -950,7 +950,7 @@ def get_matching_xpath_count(self, xpath, return_str=True): return str(count) if is_truthy(return_str) else count @keyword - def xpath_should_match_x_times(self, xpath, x, message=None, loglevel='INFO'): + def xpath_should_match_x_times(self, xpath, x, message=None, loglevel='TRACE'): """*DEPRECATED in SeleniumLibrary 3.2.* Use `Page Should Contain Element` with ``limit`` argument instead.""" self.locator_should_match_x_times('xpath:'+xpath, x, message, loglevel) diff --git a/src/SeleniumLibrary/keywords/formelement.py b/src/SeleniumLibrary/keywords/formelement.py index 913e4df2c..b486ee3e9 100644 --- a/src/SeleniumLibrary/keywords/formelement.py +++ b/src/SeleniumLibrary/keywords/formelement.py @@ -65,7 +65,7 @@ def checkbox_should_not_be_selected(self, locator): "selected." % locator) @keyword - def page_should_contain_checkbox(self, locator, message=None, loglevel='INFO'): + def page_should_contain_checkbox(self, locator, message=None, loglevel='TRACE'): """Verifies checkbox ``locator`` is found from current page. See `Page Should Contain Element` for explanation about ``message`` @@ -77,7 +77,7 @@ def page_should_contain_checkbox(self, locator, message=None, loglevel='INFO'): self.assert_page_contains(locator, 'checkbox', message, loglevel) @keyword - def page_should_not_contain_checkbox(self, locator, message=None, loglevel='INFO'): + def page_should_not_contain_checkbox(self, locator, message=None, loglevel='TRACE'): """Verifies checkbox ``locator`` is not found from current page. See `Page Should Contain Element` for explanation about ``message`` @@ -117,7 +117,7 @@ def unselect_checkbox(self, locator): element.click() @keyword - def page_should_contain_radio_button(self, locator, message=None, loglevel='INFO'): + def page_should_contain_radio_button(self, locator, message=None, loglevel='TRACE'): """Verifies radio button ``locator`` is found from current page. See `Page Should Contain Element` for explanation about ``message`` @@ -130,7 +130,7 @@ def page_should_contain_radio_button(self, locator, message=None, loglevel='INFO self.assert_page_contains(locator, 'radio button', message, loglevel) @keyword - def page_should_not_contain_radio_button(self, locator, message=None, loglevel='INFO'): + def page_should_not_contain_radio_button(self, locator, message=None, loglevel='TRACE'): """Verifies radio button ``locator`` is not found from current page. See `Page Should Contain Element` for explanation about ``message`` @@ -248,7 +248,7 @@ def input_text(self, locator, text): self._input_text_into_text_field(locator, text) @keyword - def page_should_contain_textfield(self, locator, message=None, loglevel='INFO'): + def page_should_contain_textfield(self, locator, message=None, loglevel='TRACE'): """Verifies text field ``locator`` is found from current page. See `Page Should Contain Element` for explanation about ``message`` @@ -260,7 +260,7 @@ def page_should_contain_textfield(self, locator, message=None, loglevel='INFO'): self.assert_page_contains(locator, 'text field', message, loglevel) @keyword - def page_should_not_contain_textfield(self, locator, message=None, loglevel='INFO'): + def page_should_not_contain_textfield(self, locator, message=None, loglevel='TRACE'): """Verifies text field ``locator`` is not found from current page. See `Page Should Contain Element` for explanation about ``message`` @@ -354,7 +354,7 @@ def click_button(self, locator): element.click() @keyword - def page_should_contain_button(self, locator, message=None, loglevel='INFO'): + def page_should_contain_button(self, locator, message=None, loglevel='TRACE'): """Verifies button ``locator`` is found from current page. See `Page Should Contain Element` for explanation about ``message`` @@ -370,7 +370,7 @@ def page_should_contain_button(self, locator, message=None, loglevel='INFO'): self.assert_page_contains(locator, 'button', message, loglevel) @keyword - def page_should_not_contain_button(self, locator, message=None, loglevel='INFO'): + def page_should_not_contain_button(self, locator, message=None, loglevel='TRACE'): """Verifies button ``locator`` is not found from current page. See `Page Should Contain Element` for explanation about ``message`` diff --git a/src/SeleniumLibrary/keywords/frames.py b/src/SeleniumLibrary/keywords/frames.py index 43277e63f..148076988 100644 --- a/src/SeleniumLibrary/keywords/frames.py +++ b/src/SeleniumLibrary/keywords/frames.py @@ -48,7 +48,7 @@ def unselect_frame(self): self.driver.switch_to.default_content() @keyword - def current_frame_should_contain(self, text, loglevel='INFO'): + def current_frame_should_contain(self, text, loglevel='TRACE'): """Verifies that current frame contains ``text``. See `Page Should Contain` for explanation about the ``loglevel`` @@ -64,12 +64,12 @@ def current_frame_should_contain(self, text, loglevel='INFO'): self.info("Current frame contains text '%s'." % text) @keyword - def current_frame_contains(self, text, loglevel='INFO'): + def current_frame_contains(self, text, loglevel='TRACE'): """*DEPRECATED in SeleniumLibrary 3.2.* Use `Current Frame Should Contain` instead.""" self.current_frame_should_contain(text, loglevel) @keyword - def current_frame_should_not_contain(self, text, loglevel='INFO'): + def current_frame_should_not_contain(self, text, loglevel='TRACE'): """Verifies that current frame does not contains ``text``. See `Page Should Contain` for explanation about the ``loglevel`` @@ -82,7 +82,7 @@ def current_frame_should_not_contain(self, text, loglevel='INFO'): self.info("Current frame did not contain text '%s'." % text) @keyword - def frame_should_contain(self, locator, text, loglevel='INFO'): + def frame_should_contain(self, locator, text, loglevel='TRACE'): """Verifies that frame identified by ``locator`` contains ``text``. See the `Locating elements` section for details about the locator diff --git a/src/SeleniumLibrary/keywords/selectelement.py b/src/SeleniumLibrary/keywords/selectelement.py index 212d17bdf..ffbcd105b 100644 --- a/src/SeleniumLibrary/keywords/selectelement.py +++ b/src/SeleniumLibrary/keywords/selectelement.py @@ -151,7 +151,7 @@ def list_should_have_no_selections(self, locator): % (locator, selection)) @keyword - def page_should_contain_list(self, locator, message=None, loglevel='INFO'): + def page_should_contain_list(self, locator, message=None, loglevel='TRACE'): """Verifies selection list ``locator`` is found from current page. See `Page Should Contain Element` for explanation about ``message`` @@ -163,7 +163,7 @@ def page_should_contain_list(self, locator, message=None, loglevel='INFO'): self.assert_page_contains(locator, 'list', message, loglevel) @keyword - def page_should_not_contain_list(self, locator, message=None, loglevel='INFO'): + def page_should_not_contain_list(self, locator, message=None, loglevel='TRACE'): """Verifies selection list ``locator`` is not found from current page. See `Page Should Contain Element` for explanation about ``message`` diff --git a/src/SeleniumLibrary/keywords/tableelement.py b/src/SeleniumLibrary/keywords/tableelement.py index 2270e141f..593e5e9c6 100644 --- a/src/SeleniumLibrary/keywords/tableelement.py +++ b/src/SeleniumLibrary/keywords/tableelement.py @@ -20,7 +20,7 @@ class TableElementKeywords(LibraryComponent): @keyword - def get_table_cell(self, locator, row, column, loglevel='INFO'): + def get_table_cell(self, locator, row, column, loglevel='TRACE'): """Returns contents of table cell. The table is located using the ``locator`` argument and its cell @@ -76,7 +76,7 @@ def _get_rows(self, locator, count): return rows @keyword - def table_cell_should_contain(self, locator, row, column, expected, loglevel='INFO'): + def table_cell_should_contain(self, locator, row, column, expected, loglevel='TRACE'): """Verifies table cell contains text ``expected``. See `Get Table Cell` that this keyword uses internally for @@ -92,7 +92,7 @@ def table_cell_should_contain(self, locator, row, column, expected, loglevel='IN self.info("Table cell contains '%s'." % content) @keyword - def table_column_should_contain(self, locator, column, expected, loglevel='INFO'): + def table_column_should_contain(self, locator, column, expected, loglevel='TRACE'): """Verifies table column contains text ``expected``. The table is located using the ``locator`` argument and its column @@ -116,7 +116,7 @@ def table_column_should_contain(self, locator, column, expected, loglevel='INFO' "'%s'." % (locator, column, expected)) @keyword - def table_footer_should_contain(self, locator, expected, loglevel='INFO'): + def table_footer_should_contain(self, locator, expected, loglevel='TRACE'): """Verifies table footer contains text ``expected``. Any ```` element inside ```` element is considered to @@ -135,7 +135,7 @@ def table_footer_should_contain(self, locator, expected, loglevel='INFO'): "'%s'." % (locator, expected)) @keyword - def table_header_should_contain(self, locator, expected, loglevel='INFO'): + def table_header_should_contain(self, locator, expected, loglevel='TRACE'): """Verifies table header contains text ``expected``. Any ```` element anywhere in the table is considered to be @@ -154,7 +154,7 @@ def table_header_should_contain(self, locator, expected, loglevel='INFO'): "'%s'." % (locator, expected)) @keyword - def table_row_should_contain(self, locator, row, expected, loglevel='INFO'): + def table_row_should_contain(self, locator, row, expected, loglevel='TRACE'): """Verifies that table row contains text ``expected``. The table is located using the ``locator`` argument and its column @@ -178,7 +178,7 @@ def table_row_should_contain(self, locator, row, expected, loglevel='INFO'): "'%s'." % (locator, row, expected)) @keyword - def table_should_contain(self, locator, expected, loglevel='INFO'): + def table_should_contain(self, locator, expected, loglevel='TRACE'): """Verifies table contains text ``expected``. The table is located using the ``locator`` argument. See the diff --git a/utest/run.py b/utest/run.py index a5a1f0224..db7340b13 100755 --- a/utest/run.py +++ b/utest/run.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import os import sys from os.path import abspath, dirname, join from unittest import defaultTestLoader, TextTestRunner @@ -9,7 +10,7 @@ def run_unit_tests(): - sys.path.insert(0, join(CURDIR, '..', 'src')) + sys.path.insert(0, join(CURDIR, os.pardir, 'src')) try: suite = defaultTestLoader.discover(join(CURDIR, 'test'), 'test_*.py') result = TextTestRunner().run(suite) diff --git a/utest/test/keywords/test_javascript.py b/utest/test/keywords/test_javascript.py index ba0d6d17c..71c170cd9 100644 --- a/utest/test/keywords/test_javascript.py +++ b/utest/test/keywords/test_javascript.py @@ -37,7 +37,7 @@ def setUpClass(cls): ('JAVASCRIPT', 'code1', 'code2', 'ARGUMENTS ARG2', 'arg3')] cls.js = JavaScriptKeywords(None) path = os.path.dirname(__file__) - reporter_json = os.path.abspath(os.path.join(path, '..', 'approvals_reporters.json')) + reporter_json = os.path.abspath(os.path.join(path, os.pardir, 'approvals_reporters.json')) factory = GenericDiffReporterFactory() factory.load(reporter_json) cls.reporter = factory.get_first_working()