Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- teodora.vermesan@P5086:~$ cd Desktop/
- teodora.vermesan@P5086:~/Desktop$ cd parsys/
- teodora.vermesan@P5086:~/Desktop/parsys$ cd mozillians-tests/
- teodora.vermesan@P5086:~/Desktop/parsys/mozillians-tests$ tox
- tests installed: The directory '/home/teodora.vermesan/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.,apipkg==1.4,BeautifulSoup==3.2.1,browserid==1.4,execnet==1.4.1,py==1.4.31,pytest==3.0.3,pytest-base-url==1.1.0,pytest-html==1.10.1,pytest-selenium==1.4.0,pytest-variables==1.4,pytest-xdist==1.15.0,requests==2.11.1,selenium==2.53.6
- tests runtests: PYTHONHASHSEED='1736516969'
- tests runtests: commands[0] | pytest
- ============================= test session starts ==============================
- platform linux2 -- Python 2.7.12, pytest-3.0.3, py-1.4.31, pluggy-0.4.0 -- /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- cachedir: .cache
- sensitiveurl: mozillians\.org
- driver: Firefox
- baseurl: https://mozillians.allizom.org
- rootdir: /home/teodora.vermesan/Desktop/parsys/mozillians-tests, inifile: setup.cfg
- plugins: selenium-1.4.0, variables-1.4, base-url-1.1.0, xdist-1.15.0, html-1.10.1
- [gw0] linux2 Python 2.7.12 cwd: /home/teodora.vermesan/Desktop/parsys/mozillians-tests
- [gw1] linux2 Python 2.7.12 cwd: /home/teodora.vermesan/Desktop/parsys/mozillians-tests
- [gw2] linux2 Python 2.7.12 cwd: /home/teodora.vermesan/Desktop/parsys/mozillians-tests
- [gw3] linux2 Python 2.7.12 cwd: /home/teodora.vermesan/Desktop/parsys/mozillians-tests
- [gw1] Python 2.7.12 (default, Jul 1 2016, 15:12:24) -- [GCC 5.4.0 20160609]
- [gw2] Python 2.7.12 (default, Jul 1 2016, 15:12:24) -- [GCC 5.4.0 20160609]
- [gw0] Python 2.7.12 (default, Jul 1 2016, 15:12:24) -- [GCC 5.4.0 20160609]
- [gw3] Python 2.7.12 (default, Jul 1 2016, 15:12:24) -- [GCC 5.4.0 20160609]
- gw0 [38] / gw1 [38] / gw2 [38] / gw3 [38]
- scheduling tests via LoadScheduling
- tests/test_about_page.py::TestAboutPage::test_that_links_in_the_about_page_return_200_code
- tests/test_about_page.py::TestAboutPage::test_about_page
- tests/test_account.py::TestAccount::test_logout_verify_bid
- tests/test_account.py::TestAccount::test_login_logout
- [gw3] PASSED tests/test_about_page.py::TestAboutPage::test_that_links_in_the_about_page_return_200_code
- tests/test_group.py::TestGroup::test_group_description_edit
- [gw0] PASSED tests/test_about_page.py::TestAboutPage::test_about_page
- tests/test_account.py::TestAccount::test_that_links_in_footer_return_200_code
- [gw0] PASSED tests/test_account.py::TestAccount::test_that_links_in_footer_return_200_code
- tests/test_group.py::TestGroup::test_group_invitations
- [gw2] FAILED tests/test_account.py::TestAccount::test_logout_verify_bid
- [gw1] FAILED tests/test_account.py::TestAccount::test_login_logout
- tests/test_group.py::TestGroup::test_group_type_change
- tests/test_group.py::TestGroup::test_group_deletion_confirmation
- [gw3] FAILED tests/test_group.py::TestGroup::test_group_description_edit
- tests/test_invite.py::TestInvite::test_inviting_an_invalid_email_address
- [gw0] FAILED tests/test_group.py::TestGroup::test_group_invitations
- tests/test_profile.py::TestProfile::test_profile_deletion_confirmation
- [gw2] FAILED tests/test_group.py::TestGroup::test_group_type_change
- tests/test_profile.py::TestProfile::test_skill_addition
- [gw1] FAILED tests/test_group.py::TestGroup::test_group_deletion_confirmation
- tests/test_profile.py::TestProfile::test_that_filter_by_city_works
- [gw3] FAILED tests/test_invite.py::TestInvite::test_inviting_an_invalid_email_address
- tests/test_invite.py::TestInvite::test_invite
- [gw0] FAILED tests/test_profile.py::TestProfile::test_profile_deletion_confirmation
- tests/test_profile.py::TestProfile::test_edit_profile_information
- [gw2] FAILED tests/test_profile.py::TestProfile::test_skill_addition
- tests/test_profile.py::TestProfile::test_skill_deletion
- [gw1] FAILED tests/test_profile.py::TestProfile::test_that_filter_by_city_works
- tests/test_profile.py::TestProfile::test_that_filter_by_region_works
- [gw3] FAILED tests/test_invite.py::TestInvite::test_invite
- tests/test_profile.py::TestProfile::test_that_filter_by_country_works
- [gw0] FAILED tests/test_profile.py::TestProfile::test_edit_profile_information
- tests/test_profile.py::TestProfile::test_that_non_us_user_can_set_get_involved_date
- [gw2] FAILED tests/test_profile.py::TestProfile::test_skill_deletion
- tests/test_profile.py::TestProfile::test_that_user_can_create_and_delete_group
- [gw1] FAILED tests/test_profile.py::TestProfile::test_that_filter_by_region_works
- tests/test_profile.py::TestProfile::test_private_groups_field_as_public_when_logged_in
- [gw3] FAILED tests/test_profile.py::TestProfile::test_that_filter_by_country_works
- tests/test_profile.py::TestProfile::test_private_groups_field_when_not_logged_in
- [gw0] FAILED tests/test_profile.py::TestProfile::test_that_non_us_user_can_set_get_involved_date
- tests/test_profile.py::TestProfile::test_that_links_in_the_services_page_return_200_code
- [gw2] FAILED tests/test_profile.py::TestProfile::test_that_user_can_create_and_delete_group
- tests/test_profile.py::TestProfile::test_that_user_can_view_external_accounts
- [gw1] FAILED tests/test_profile.py::TestProfile::test_private_groups_field_as_public_when_logged_in
- tests/test_profile.py::TestProfile::test_that_user_can_add_external_account
- [gw0] FAILED tests/test_profile.py::TestProfile::test_that_links_in_the_services_page_return_200_code
- tests/test_profile.py::TestProfile::test_new_user_cannot_see_groups_or_functional_areas
- [gw2] FAILED tests/test_profile.py::TestProfile::test_that_user_can_view_external_accounts
- tests/test_redirects.py::TestRedirects::test_302_redirect_for_anonymous_users
- [gw2] PASSED tests/test_redirects.py::TestRedirects::test_302_redirect_for_anonymous_users
- tests/test_register.py::TestRegister::test_creating_profile_without_checking_privacy_policy_checkbox
- [gw1] FAILED tests/test_profile.py::TestProfile::test_that_user_can_add_external_account
- tests/test_redirects.py::TestRedirects::test_200_for_anonymous_users
- [gw1] PASSED tests/test_redirects.py::TestRedirects::test_200_for_anonymous_users
- tests/test_search.py::TestSearch::test_that_search_returns_results_for_first_name
- [gw0] FAILED tests/test_profile.py::TestProfile::test_new_user_cannot_see_groups_or_functional_areas
- tests/test_register.py::TestRegister::test_profile_creation
- [gw3] FAILED tests/test_profile.py::TestProfile::test_private_groups_field_when_not_logged_in
- tests/test_profile.py::TestProfile::test_that_user_can_modify_external_accounts_irc_nickname
- [gw1] FAILED tests/test_search.py::TestSearch::test_that_search_returns_results_for_first_name
- tests/test_search.py::TestSearch::test_that_search_returns_results_for_irc_nickname
- [gw2] PASSED tests/test_register.py::TestRegister::test_creating_profile_without_checking_privacy_policy_checkbox
- tests/test_search.py::TestSearch::test_that_search_returns_results_for_email_substring
- [gw0] PASSED tests/test_register.py::TestRegister::test_profile_creation
- [gw1] FAILED tests/test_search.py::TestSearch::test_that_search_returns_results_for_irc_nickname
- [gw2] FAILED tests/test_search.py::TestSearch::test_that_search_returns_results_for_email_substring
- [gw3] FAILED tests/test_profile.py::TestProfile::test_that_user_can_modify_external_accounts_irc_nickname
- tests/test_search.py::TestSearch::test_search_for_not_existing_mozillian_when_logged_in
- tests/test_search.py::TestSearch::test_search_for_empty_string_redirects_to_search_page
- tests/test_search.py::TestSearch::test_vouched_user_count
- tests/test_search.py::TestSearch::test_search_for_not_existing_mozillian_when_not_logged_in
- [gw2] xfail tests/test_search.py::TestSearch::test_vouched_user_count
- [gw1] PASSED tests/test_search.py::TestSearch::test_search_for_empty_string_redirects_to_search_page
- [gw3] PASSED tests/test_search.py::TestSearch::test_search_for_not_existing_mozillian_when_not_logged_in
- [gw0] FAILED tests/test_search.py::TestSearch::test_search_for_not_existing_mozillian_when_logged_in
- generated xml file: /home/teodora.vermesan/Desktop/parsys/mozillians-tests/results/junit.xml
- generated html file: /home/teodora.vermesan/Desktop/parsys/mozillians-tests/results/index.html
- =========================== short test summary info ============================
- FAIL tests/test_account.py::TestAccount::()::test_logout_verify_bid
- FAIL tests/test_account.py::TestAccount::()::test_login_logout
- FAIL tests/test_group.py::TestGroup::()::test_group_description_edit
- FAIL tests/test_group.py::TestGroup::()::test_group_invitations
- FAIL tests/test_group.py::TestGroup::()::test_group_type_change
- FAIL tests/test_group.py::TestGroup::()::test_group_deletion_confirmation
- FAIL tests/test_invite.py::TestInvite::()::test_inviting_an_invalid_email_address
- FAIL tests/test_profile.py::TestProfile::()::test_profile_deletion_confirmation
- FAIL tests/test_profile.py::TestProfile::()::test_skill_addition
- FAIL tests/test_profile.py::TestProfile::()::test_that_filter_by_city_works
- FAIL tests/test_invite.py::TestInvite::()::test_invite
- FAIL tests/test_profile.py::TestProfile::()::test_edit_profile_information
- FAIL tests/test_profile.py::TestProfile::()::test_skill_deletion
- FAIL tests/test_profile.py::TestProfile::()::test_that_filter_by_region_works
- FAIL tests/test_profile.py::TestProfile::()::test_that_filter_by_country_works
- FAIL tests/test_profile.py::TestProfile::()::test_that_non_us_user_can_set_get_involved_date
- FAIL tests/test_profile.py::TestProfile::()::test_that_user_can_create_and_delete_group
- FAIL tests/test_profile.py::TestProfile::()::test_private_groups_field_as_public_when_logged_in
- FAIL tests/test_profile.py::TestProfile::()::test_that_links_in_the_services_page_return_200_code
- FAIL tests/test_profile.py::TestProfile::()::test_that_user_can_view_external_accounts
- FAIL tests/test_profile.py::TestProfile::()::test_that_user_can_add_external_account
- FAIL tests/test_profile.py::TestProfile::()::test_new_user_cannot_see_groups_or_functional_areas
- FAIL tests/test_profile.py::TestProfile::()::test_private_groups_field_when_not_logged_in
- FAIL tests/test_search.py::TestSearch::()::test_that_search_returns_results_for_first_name
- FAIL tests/test_search.py::TestSearch::()::test_that_search_returns_results_for_irc_nickname
- FAIL tests/test_search.py::TestSearch::()::test_that_search_returns_results_for_email_substring
- FAIL tests/test_profile.py::TestProfile::()::test_that_user_can_modify_external_accounts_irc_nickname
- FAIL tests/test_search.py::TestSearch::()::test_search_for_not_existing_mozillian_when_logged_in
- XFAIL tests/test_search.py::TestSearch::()::test_vouched_user_count
- bug 977424 - API count and actual count do not return the same values
- =================================== FAILURES ===================================
- ______________________ TestAccount.test_logout_verify_bid ______________________
- [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_account.TestAccount instance at 0x7f254d3348c0>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="58d0ae89-9d2f-42ce-acc6-28792cf02337")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_logout_verify_bid(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_account.py:28:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254d349390>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"58d0ae89-9d2f-42ce-acc6-28792cf02337","status":7,"value":...mp/tmpqQfcRE/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpqQfcRE/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpqQfcRE/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3Dc4033377974fa3bf82378e209181e98328fa9395febf9b3a%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-1b2ca8f70f6fa16b&oauth=1&sarp=1&scc=1#identifier
- ________________________ TestAccount.test_login_logout _________________________
- [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_account.TestAccount instance at 0x7fea9ad128c0>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="59fae178-e9ad-4a0d-8dc5-3d55dae1db9b")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_login_logout(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_account.py:19:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea9ad27390>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"59fae178-e9ad-4a0d-8dc5-3d55dae1db9b","status":7,"value":...mp/tmpfkNM2e/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpfkNM2e/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpfkNM2e/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3Da608920916b7877afc9f17cdc7a05fea1872d9138a01f033%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-3b05f1593b825258&oauth=1&sarp=1&scc=1#identifier
- ____________________ TestGroup.test_group_description_edit _____________________
- [gw3] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_group.TestGroup instance at 0x7f362fdac518>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="2e014561-611a-480a-bf5b-f753f132725c")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- def test_group_description_edit(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_group.py:18:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f3634685110>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"2e014561-611a-480a-bf5b-f753f132725c","status":7,"value":...mp/tmpGEoClM/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpGEoClM/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpGEoClM/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D5e933174bcb5e1c3f2e25c0cf834098347bab5a64dd8ba1a%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-19edf28c4afab4ab&oauth=1&sarp=1&scc=1#identifier
- _______________________ TestGroup.test_group_invitations _______________________
- [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_group.TestGroup instance at 0x7f5d191aecb0>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="1ed99f09-a360-4535-a910-d85c1aa52b7e")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- def test_group_invitations(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_group.py:79:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d19201a50>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"1ed99f09-a360-4535-a910-d85c1aa52b7e","status":7,"value":...mp/tmpcvQsVM/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpcvQsVM/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpcvQsVM/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D2aa4152b93914a764b985d9250d3a4e1e5dae3f99229b838%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D13476726b6cfdd19&oauth=1&sarp=1&scc=1#identifier
- _______________________ TestGroup.test_group_type_change _______________________
- [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_group.TestGroup instance at 0x7f254c4d8cb0>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="0f2c91c0-b586-4fd6-beeb-b11b4fc74db2")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- def test_group_type_change(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_group.py:63:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254c616110>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"0f2c91c0-b586-4fd6-beeb-b11b4fc74db2","status":7,"value":...mp/tmpS5OV3K/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpS5OV3K/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpS5OV3K/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D0181985dde097592d0132dbac16ba63e5c19f40f7d678747%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D499e3d624cf97c94&oauth=1&sarp=1&scc=1#identifier
- __________________ TestGroup.test_group_deletion_confirmation __________________
- [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_group.TestGroup instance at 0x7fea99eb6b90>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="be8d057e-d2fd-4ea1-a875-4df9c2a679d1")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- def test_group_deletion_confirmation(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_group.py:45:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea99ff4110>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"be8d057e-d2fd-4ea1-a875-4df9c2a679d1","status":7,"value":...mp/tmpZOj6wq/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpZOj6wq/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpZOj6wq/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3Dac49d35c6c4efa0681444fcc7da53ba5f8a63b20932955dc%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D666e132da2cdd2a3&oauth=1&sarp=1&scc=1#identifier
- ______________ TestInvite.test_inviting_an_invalid_email_address _______________
- [gw3] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_invite.TestInvite instance at 0x7f362f806b48>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="7887bbbf-aa82-4aa9-8838-c5553e4f83d7")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- def test_inviting_an_invalid_email_address(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_invite.py:17:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f362f936d90>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"7887bbbf-aa82-4aa9-8838-c5553e4f83d7","status":7,"value":...mp/tmpo482gQ/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpo482gQ/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpo482gQ/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D597e782d72ee4b75844d8e29ec420e271e8aec86e7051e66%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-36551eb2fbd6b61&oauth=1&sarp=1&scc=1#identifier
- ________________ TestProfile.test_profile_deletion_confirmation ________________
- [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7f5d191a0a70>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="8333cfd8-ac3b-47c6-bfc2-76d2b8abd6b4")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_profile_deletion_confirmation(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_profile.py:21:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d191b3710>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"8333cfd8-ac3b-47c6-bfc2-76d2b8abd6b4","status":7,"value":...mp/tmpaaPc9c/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpaaPc9c/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpaaPc9c/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D20d2be1a9479695a0a8bffd02ea610613b6f839db07cacd1%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D5f5b1992c29472e5&oauth=1&sarp=1&scc=1#identifier
- _______________________ TestProfile.test_skill_addition ________________________
- [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7f254c63f3f8>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="16b31876-89a0-4012-ab10-e05953d21628")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- def test_skill_addition(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_profile.py:64:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254c6169d0>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"16b31876-89a0-4012-ab10-e05953d21628","status":7,"value":...mp/tmpTpOv6F/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpTpOv6F/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpTpOv6F/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3Dc24028ec6dcee193d56e0aa5f07642fc637aa81f29180fdb%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D21a4a6e6bdbac081&oauth=1&sarp=1&scc=1#identifier
- __________________ TestProfile.test_that_filter_by_city_works __________________
- [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7fea9a01d5a8>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="567d842e-f413-4fa1-b990-9eb379c8de53")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_that_filter_by_city_works(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_profile.py:105:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea99ff49d0>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"567d842e-f413-4fa1-b990-9eb379c8de53","status":7,"value":...mp/tmpEX16iM/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpEX16iM/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpEX16iM/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D1c912fc7fc281217d602aa9cd2bf6cac33efecec67531891%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-14a16f0173497310&oauth=1&sarp=1&scc=1#identifier
- ____________________________ TestInvite.test_invite ____________________________
- [gw3] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_invite.TestInvite instance at 0x7f362fda6a70>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="3bf83b05-f927-4473-a314-5bd17c2a4fc0")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- def test_invite(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_invite.py:25:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f362f901c90>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"3bf83b05-f927-4473-a314-5bd17c2a4fc0","status":7,"value":...mp/tmpaGvGHq/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpaGvGHq/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpaGvGHq/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3De2df69f30181c3150ed9d236ff5ea6ee17d07a9a75e59639%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D14301e521169b9a6&oauth=1&sarp=1&scc=1#identifier
- __________________ TestProfile.test_edit_profile_information ___________________
- [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7f5d19024e60>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="a5478f83-5bbc-4363-9132-dfab2d84b0eb")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- def test_edit_profile_information(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_profile.py:40:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d19195a50>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"a5478f83-5bbc-4363-9132-dfab2d84b0eb","status":7,"value":...mp/tmpwnrmVy/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpwnrmVy/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpwnrmVy/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D1e382d64c15e1528a88a485960a85f094c3052551dfe3bff%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-33a5faa6b13f0371&oauth=1&sarp=1&scc=1#identifier
- _______________________ TestProfile.test_skill_deletion ________________________
- [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7f254c5dc3f8>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="8d5deea2-b4cb-4bdc-9af9-556ec9bb264c")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- def test_skill_deletion(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_profile.py:80:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254c668350>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"8d5deea2-b4cb-4bdc-9af9-556ec9bb264c","status":7,"value":...mp/tmpY2lj7_/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpY2lj7_/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpY2lj7_/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D69d48fd36c29425de79d1e4126b17c1aeb230fe27bd2ecac%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-30f28fba554867d3&oauth=1&sarp=1&scc=1#identifier
- _________________ TestProfile.test_that_filter_by_region_works _________________
- [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7fea9ad98710>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="dae79a63-3f50-48c4-b696-d8e180ead524")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_that_filter_by_region_works(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_profile.py:124:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea9a046350>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"dae79a63-3f50-48c4-b696-d8e180ead524","status":7,"value":...mp/tmp7uyDGN/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmp7uyDGN/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmp7uyDGN/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D137b75bd369e52ad3a796a4b5ce09bcd41cc55679ed42659%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-4488def1976405dd&oauth=1&sarp=1&scc=1#identifier
- ________________ TestProfile.test_that_filter_by_country_works _________________
- [gw3] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7f36346d6518>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="2114c3f9-755e-4248-8a88-a35ecdba5877")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_that_filter_by_country_works(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_profile.py:142:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f3634685290>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"2114c3f9-755e-4248-8a88-a35ecdba5877","status":7,"value":...mp/tmpEr7Owl/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpEr7Owl/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpEr7Owl/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3Dfa308c53ddb04b5a531a383425cb93aec57f822e1ac06b68%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-1564577156bd4676&oauth=1&sarp=1&scc=1#identifier
- _________ TestProfile.test_that_non_us_user_can_set_get_involved_date __________
- [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7f5d19f5a320>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="d4f1bfa3-e24a-4fc6-9463-71fe879e5d98")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- def test_that_non_us_user_can_set_get_involved_date(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_profile.py:158:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d19201990>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"d4f1bfa3-e24a-4fc6-9463-71fe879e5d98","status":7,"value":...mp/tmp4j2BZl/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmp4j2BZl/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmp4j2BZl/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D1bb2a507053dbbb399c74600e97eeb5a165f4c362825a159%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D1ca4c33d5f7e1301&oauth=1&sarp=1&scc=1#identifier
- ____________ TestProfile.test_that_user_can_create_and_delete_group ____________
- [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7f254c65f758>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="891c1013-7df8-44e0-bcae-794db450720f")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- def test_that_user_can_create_and_delete_group(self, base_url, selenium, vouched_user):
- group_name = (time.strftime('%x-%X'))
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_profile.py:179:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254c58d5d0>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"891c1013-7df8-44e0-bcae-794db450720f","status":7,"value":...mp/tmp4YTyUC/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmp4YTyUC/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmp4YTyUC/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3Db337a771d9cc8eb0aad6ac488f62ac153c36bdee69bbaa35%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-17f71845f5b796e0&oauth=1&sarp=1&scc=1#identifier
- ________ TestProfile.test_private_groups_field_as_public_when_logged_in ________
- [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7fea9adb5098>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="795cdfa8-6214-4e10-99b0-8c7e1db3a8bc")>
- private_user = {'email': 'teovermesantest2@gmail.com', 'name': 'teo test2', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_private_groups_field_as_public_when_logged_in(self, base_url, selenium, private_user):
- # User has certain fields preset to values to run the test properly
- # groups - private
- # belongs to at least one group
- home_page = Home(base_url, selenium)
- > home_page.login(private_user['email'], private_user['password'])
- tests/test_profile.py:205:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea99f6a4d0>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"795cdfa8-6214-4e10-99b0-8c7e1db3a8bc","status":7,"value":...mp/tmpaLqUg8/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpaLqUg8/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpaLqUg8/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest2@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D6ac7a36a3db183faf0047e1a456b301f0746c31146b62a13%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D4085fdf4423e87c1&oauth=1&sarp=1&scc=1#identifier
- _______ TestProfile.test_that_links_in_the_services_page_return_200_code _______
- [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7f5d1909b488>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="716c6b77-90c1-4c15-9705-731aeed20949")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_that_links_in_the_services_page_return_200_code(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_profile.py:222:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d19163a50>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"716c6b77-90c1-4c15-9705-731aeed20949","status":7,"value":...mp/tmpa6Gz4s/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpa6Gz4s/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpa6Gz4s/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3Dc8c0ddb5ea9d958239312da68e00cb9bd73349811f6f5f06%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-2a9f0bd002b4bf1b&oauth=1&sarp=1&scc=1#identifier
- ____________ TestProfile.test_that_user_can_view_external_accounts _____________
- [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7f254c422cf8>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="662ab1bf-3562-420e-9485-c38410e7c42d")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_that_user_can_view_external_accounts(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_profile.py:243:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254c624750>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"662ab1bf-3562-420e-9485-c38410e7c42d","status":7,"value":...mp/tmpkM4zNY/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpkM4zNY/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpkM4zNY/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D9ff6a074a16fb8f46e9aee70e2fe3a77f0f934708475b140%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-528e1ed966a133a6&oauth=1&sarp=1&scc=1#identifier
- _____________ TestProfile.test_that_user_can_add_external_account ______________
- [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7fea99dfd5f0>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="38570df2-0901-428b-a5bd-4f2cd0ac13e0")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- def test_that_user_can_add_external_account(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_profile.py:252:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea9a001610>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"38570df2-0901-428b-a5bd-4f2cd0ac13e0","status":7,"value":...mp/tmpWaWi6l/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpWaWi6l/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpWaWi6l/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3Da71ea3bde902f361fc073f3d6b919582c3adf12c6dc84833%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-47f08368a2e78531&oauth=1&sarp=1&scc=1#identifier
- _______ TestProfile.test_new_user_cannot_see_groups_or_functional_areas ________
- [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7f5d19186050>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="5d49ec9a-2fa2-4ee1-937c-108c93fe396b")>
- unvouched_user = {'email': 'teovermesantest3@gmail.com', 'name': 'teo test3', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_new_user_cannot_see_groups_or_functional_areas(self, base_url, selenium, unvouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(unvouched_user['email'], unvouched_user['password'])
- tests/test_profile.py:288:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d192014d0>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"5d49ec9a-2fa2-4ee1-937c-108c93fe396b","status":7,"value":...mp/tmpB9KXQ0/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpB9KXQ0/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpB9KXQ0/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest3@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3Dd906018fd6fc72937487a4e011ce40cf67a939a88b87f14a%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-42b941b59e2519e8&oauth=1&sarp=1&scc=1#identifier
- ___________ TestProfile.test_private_groups_field_when_not_logged_in ___________
- [gw3] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7f36346bb9e0>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="97f2c6d2-1fbc-42e2-a31b-7bfd26dee860")>
- private_user = {'email': 'teovermesantest2@gmail.com', 'name': 'teo test2', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_private_groups_field_when_not_logged_in(self, base_url, selenium, private_user):
- home_page = Home(base_url, selenium)
- > profile_page = home_page.open_user_profile(private_user['name'])
- tests/test_profile.py:215:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:82: in open_user_profile
- return Profile(self.base_url, self.selenium)
- pages/profile.py:37: in __init__
- lambda s: self.is_element_visible(*self._profile_photo_locator))
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.support.wait.WebDriverWait (session="97f2c6d2-1fbc-42e2-a31b-7bfd26dee860")>
- method = <function <lambda> at 0x7f362f88c9b0>, message = ''
- def until(self, method, message=''):
- """Calls the method provided with the driver as an argument until the \
- return value is not False."""
- screen = None
- stacktrace = None
- end_time = time.time() + self._timeout
- while True:
- try:
- value = method(self._driver)
- if value:
- return value
- except self._ignored_exceptions as exc:
- screen = getattr(exc, 'screen', None)
- stacktrace = getattr(exc, 'stacktrace', None)
- time.sleep(self._poll)
- if time.time() > end_time:
- break
- > raise TimeoutException(message, screen, stacktrace)
- E TimeoutException: Message:
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/support/wait.py:80: TimeoutException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://mozillians.allizom.org/en-US/u/teo%20test2
- __________ TestSearch.test_that_search_returns_results_for_first_name __________
- [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_search.TestSearch instance at 0x7fea9ad55290>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="2637e38a-c5a5-4c5c-9d33-522e8295ecf7")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_that_search_returns_results_for_first_name(self, base_url, selenium, vouched_user):
- query = u'Matt'
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_search.py:33:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea99f793d0>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"2637e38a-c5a5-4c5c-9d33-522e8295ecf7","status":7,"value":...mp/tmp3ocsES/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmp3ocsES/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmp3ocsES/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D649156813356456a62539954aa6f84ba3f7d4d9636234440%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D87670a98b68d6b3&oauth=1&sarp=1&scc=1#identifier
- _________ TestSearch.test_that_search_returns_results_for_irc_nickname _________
- [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_search.TestSearch instance at 0x7fea9a014560>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="5d0a037f-f884-44f7-9a10-65ef85611fc6")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_that_search_returns_results_for_irc_nickname(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_search.py:45:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea99f89950>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"5d0a037f-f884-44f7-9a10-65ef85611fc6","status":7,"value":...mp/tmpvOQmL1/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpvOQmL1/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpvOQmL1/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3De9abb4e2f44721ed637fd19376619352ff3bf3276c44cd31%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D3b503524af07e279&oauth=1&sarp=1&scc=1#identifier
- _______ TestSearch.test_that_search_returns_results_for_email_substring ________
- [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_search.TestSearch instance at 0x7f254c43b758>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="b19151e8-fae7-4912-a486-5ab5935b91cf")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.xfail("'mozillians-dev' in config.getvalue('base_url')",
- reason="Bug 944101 - Searching by email substring does not return all results")
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_that_search_returns_results_for_email_substring(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_search.py:24:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254c5eeb10>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"b19151e8-fae7-4912-a486-5ab5935b91cf","status":7,"value":...mp/tmpE5Fw_Q/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpE5Fw_Q/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpE5Fw_Q/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D9d781001e02268cf3680393037e1a4c5be029478de73ad0c%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D-5ea52d0c34a922d7&oauth=1&sarp=1&scc=1#identifier
- _____ TestProfile.test_that_user_can_modify_external_accounts_irc_nickname _____
- [gw3] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_profile.TestProfile instance at 0x7f362fda6830>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="ec81104c-a0bf-4230-a9cd-f6a182e77894")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- def test_that_user_can_modify_external_accounts_irc_nickname(self, base_url, selenium, vouched_user):
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_profile.py:264:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f362fddaa50>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"ec81104c-a0bf-4230-a9cd-f6a182e77894","status":7,"value":...mp/tmpYiaGFc/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpYiaGFc/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpYiaGFc/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D229b78ceebfa14af54eb09e9545f1b4f67332ba2534c39c3%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D35fb27966fd75106&oauth=1&sarp=1&scc=1#identifier
- _______ TestSearch.test_search_for_not_existing_mozillian_when_logged_in _______
- [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
- self = <tests.test_search.TestSearch instance at 0x7f5d18f82e18>
- base_url = 'https://mozillians.allizom.org'
- selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="d0ceb1de-0d54-4ae6-899f-361499c599de")>
- vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
- @pytest.mark.credentials
- @pytest.mark.nondestructive
- def test_search_for_not_existing_mozillian_when_logged_in(self, base_url, selenium, vouched_user):
- query = u'Qwerty'
- home_page = Home(base_url, selenium)
- > home_page.login(vouched_user['email'], vouched_user['password'])
- tests/test_search.py:55:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pages/base.py:56: in login
- pop_up.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
- sign_in.sign_in(email, password)
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
- self.click_next(expect='password')
- .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
- *self._checking_email_provider_loading_locator)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
- 'value': value})['value']
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
- self.error_handler.check_response(response)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d18d52710>
- response = {'status': 500, 'value': '{"name":"findElement","sessionId":"d0ceb1de-0d54-4ae6-899f-361499c599de","status":7,"value":...mp/tmprBK3iM/extensions/fxdriver@googlecode.com/components/driver-component.js","lineNumber":625,"columnNumber":5}]}}'}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response.get('status', None)
- if status is None or status == ErrorCode.SUCCESS:
- return
- value = None
- message = response.get("message", "")
- screen = response.get("screen", "")
- stacktrace = None
- if isinstance(status, int):
- value_json = response.get('value', None)
- if value_json and isinstance(value_json, basestring):
- import json
- try:
- value = json.loads(value_json)
- status = value.get('error', None)
- if status is None:
- status = value["status"]
- message = value["value"]
- if not isinstance(message, basestring):
- value = message
- try:
- message = message['message']
- except TypeError:
- message = None
- else:
- message = value.get('message', None)
- except ValueError:
- pass
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- if value == '' or value is None:
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- if message == "" and 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
- E Stacktrace:
- E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmprBK3iM/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
- E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmprBK3iM/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
- .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
- ------------------------------- pytest-selenium --------------------------------
- URL: https://accounts.google.com/ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?login_hint%3Dteovermesantest@gmail.com%26access_type%3Donline%26openid.realm%3Dhttps://*.persona.org%26scope%3Dopenid%2Bemail%26response_type%3Dcode%26state%3D7539f36301fb824585647f633c0f866a54f7809f4dbf07b4%26redirect_uri%3Dhttps://gmail.login.persona.org/authenticate/verify%26client_id%3D562561259669-b2h4dbvmiqm900qn8t36d0022sltteiv.apps.googleusercontent.com%26from_login%3D1%26as%3D56d76b9965bae2f6&oauth=1&sarp=1&scc=1#identifier
- =============== 28 failed, 9 passed, 1 xfailed in 224.72 seconds ===============
- ERROR: InvocationError: '/home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/pytest'
- flake8 installed: The directory '/home/teodora.vermesan/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.,configparser==3.5.0,enum34==1.1.6,flake8==3.0.4,mccabe==0.5.2,pycodestyle==2.0.0,pyflakes==1.2.3
- flake8 runtests: PYTHONHASHSEED='1736516969'
- flake8 runtests: commands[0] | flake8 .
- ___________________________________ summary ____________________________________
- ERROR: tests: commands failed
- flake8: commands succeeded
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement