Advertisement
Guest User

Untitled

a guest
Oct 12th, 2016
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 243.63 KB | None | 0 0
  1. teodora.vermesan@P5086:~$ cd Desktop/
  2. teodora.vermesan@P5086:~/Desktop$ cd parsys/
  3. teodora.vermesan@P5086:~/Desktop/parsys$ cd mozillians-tests/
  4. teodora.vermesan@P5086:~/Desktop/parsys/mozillians-tests$ tox
  5. 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
  6. tests runtests: PYTHONHASHSEED='1736516969'
  7. tests runtests: commands[0] | pytest
  8. ============================= test session starts ==============================
  9. 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
  10. cachedir: .cache
  11. sensitiveurl: mozillians\.org
  12. driver: Firefox
  13. baseurl: https://mozillians.allizom.org
  14. rootdir: /home/teodora.vermesan/Desktop/parsys/mozillians-tests, inifile: setup.cfg
  15. plugins: selenium-1.4.0, variables-1.4, base-url-1.1.0, xdist-1.15.0, html-1.10.1
  16. [gw0] linux2 Python 2.7.12 cwd: /home/teodora.vermesan/Desktop/parsys/mozillians-tests
  17. [gw1] linux2 Python 2.7.12 cwd: /home/teodora.vermesan/Desktop/parsys/mozillians-tests
  18. [gw2] linux2 Python 2.7.12 cwd: /home/teodora.vermesan/Desktop/parsys/mozillians-tests
  19. [gw3] linux2 Python 2.7.12 cwd: /home/teodora.vermesan/Desktop/parsys/mozillians-tests
  20. [gw1] Python 2.7.12 (default, Jul 1 2016, 15:12:24) -- [GCC 5.4.0 20160609]
  21. [gw2] Python 2.7.12 (default, Jul 1 2016, 15:12:24) -- [GCC 5.4.0 20160609]
  22. [gw0] Python 2.7.12 (default, Jul 1 2016, 15:12:24) -- [GCC 5.4.0 20160609]
  23. [gw3] Python 2.7.12 (default, Jul 1 2016, 15:12:24) -- [GCC 5.4.0 20160609]
  24. gw0 [38] / gw1 [38] / gw2 [38] / gw3 [38]
  25. scheduling tests via LoadScheduling
  26.  
  27. tests/test_about_page.py::TestAboutPage::test_that_links_in_the_about_page_return_200_code
  28. tests/test_about_page.py::TestAboutPage::test_about_page
  29. tests/test_account.py::TestAccount::test_logout_verify_bid
  30. tests/test_account.py::TestAccount::test_login_logout
  31. [gw3] PASSED tests/test_about_page.py::TestAboutPage::test_that_links_in_the_about_page_return_200_code
  32. tests/test_group.py::TestGroup::test_group_description_edit
  33. [gw0] PASSED tests/test_about_page.py::TestAboutPage::test_about_page
  34. tests/test_account.py::TestAccount::test_that_links_in_footer_return_200_code
  35. [gw0] PASSED tests/test_account.py::TestAccount::test_that_links_in_footer_return_200_code
  36. tests/test_group.py::TestGroup::test_group_invitations
  37. [gw2] FAILED tests/test_account.py::TestAccount::test_logout_verify_bid
  38. [gw1] FAILED tests/test_account.py::TestAccount::test_login_logout
  39. tests/test_group.py::TestGroup::test_group_type_change
  40. tests/test_group.py::TestGroup::test_group_deletion_confirmation
  41. [gw3] FAILED tests/test_group.py::TestGroup::test_group_description_edit
  42. tests/test_invite.py::TestInvite::test_inviting_an_invalid_email_address
  43. [gw0] FAILED tests/test_group.py::TestGroup::test_group_invitations
  44. tests/test_profile.py::TestProfile::test_profile_deletion_confirmation
  45. [gw2] FAILED tests/test_group.py::TestGroup::test_group_type_change
  46. tests/test_profile.py::TestProfile::test_skill_addition
  47. [gw1] FAILED tests/test_group.py::TestGroup::test_group_deletion_confirmation
  48. tests/test_profile.py::TestProfile::test_that_filter_by_city_works
  49. [gw3] FAILED tests/test_invite.py::TestInvite::test_inviting_an_invalid_email_address
  50. tests/test_invite.py::TestInvite::test_invite
  51. [gw0] FAILED tests/test_profile.py::TestProfile::test_profile_deletion_confirmation
  52. tests/test_profile.py::TestProfile::test_edit_profile_information
  53. [gw2] FAILED tests/test_profile.py::TestProfile::test_skill_addition
  54. tests/test_profile.py::TestProfile::test_skill_deletion
  55. [gw1] FAILED tests/test_profile.py::TestProfile::test_that_filter_by_city_works
  56. tests/test_profile.py::TestProfile::test_that_filter_by_region_works
  57. [gw3] FAILED tests/test_invite.py::TestInvite::test_invite
  58. tests/test_profile.py::TestProfile::test_that_filter_by_country_works
  59. [gw0] FAILED tests/test_profile.py::TestProfile::test_edit_profile_information
  60. tests/test_profile.py::TestProfile::test_that_non_us_user_can_set_get_involved_date
  61. [gw2] FAILED tests/test_profile.py::TestProfile::test_skill_deletion
  62. tests/test_profile.py::TestProfile::test_that_user_can_create_and_delete_group
  63. [gw1] FAILED tests/test_profile.py::TestProfile::test_that_filter_by_region_works
  64. tests/test_profile.py::TestProfile::test_private_groups_field_as_public_when_logged_in
  65. [gw3] FAILED tests/test_profile.py::TestProfile::test_that_filter_by_country_works
  66. tests/test_profile.py::TestProfile::test_private_groups_field_when_not_logged_in
  67. [gw0] FAILED tests/test_profile.py::TestProfile::test_that_non_us_user_can_set_get_involved_date
  68. tests/test_profile.py::TestProfile::test_that_links_in_the_services_page_return_200_code
  69. [gw2] FAILED tests/test_profile.py::TestProfile::test_that_user_can_create_and_delete_group
  70. tests/test_profile.py::TestProfile::test_that_user_can_view_external_accounts
  71. [gw1] FAILED tests/test_profile.py::TestProfile::test_private_groups_field_as_public_when_logged_in
  72. tests/test_profile.py::TestProfile::test_that_user_can_add_external_account
  73. [gw0] FAILED tests/test_profile.py::TestProfile::test_that_links_in_the_services_page_return_200_code
  74. tests/test_profile.py::TestProfile::test_new_user_cannot_see_groups_or_functional_areas
  75. [gw2] FAILED tests/test_profile.py::TestProfile::test_that_user_can_view_external_accounts
  76. tests/test_redirects.py::TestRedirects::test_302_redirect_for_anonymous_users
  77. [gw2] PASSED tests/test_redirects.py::TestRedirects::test_302_redirect_for_anonymous_users
  78. tests/test_register.py::TestRegister::test_creating_profile_without_checking_privacy_policy_checkbox
  79. [gw1] FAILED tests/test_profile.py::TestProfile::test_that_user_can_add_external_account
  80. tests/test_redirects.py::TestRedirects::test_200_for_anonymous_users
  81. [gw1] PASSED tests/test_redirects.py::TestRedirects::test_200_for_anonymous_users
  82. tests/test_search.py::TestSearch::test_that_search_returns_results_for_first_name
  83. [gw0] FAILED tests/test_profile.py::TestProfile::test_new_user_cannot_see_groups_or_functional_areas
  84. tests/test_register.py::TestRegister::test_profile_creation
  85. [gw3] FAILED tests/test_profile.py::TestProfile::test_private_groups_field_when_not_logged_in
  86. tests/test_profile.py::TestProfile::test_that_user_can_modify_external_accounts_irc_nickname
  87. [gw1] FAILED tests/test_search.py::TestSearch::test_that_search_returns_results_for_first_name
  88. tests/test_search.py::TestSearch::test_that_search_returns_results_for_irc_nickname
  89. [gw2] PASSED tests/test_register.py::TestRegister::test_creating_profile_without_checking_privacy_policy_checkbox
  90. tests/test_search.py::TestSearch::test_that_search_returns_results_for_email_substring
  91. [gw0] PASSED tests/test_register.py::TestRegister::test_profile_creation
  92. [gw1] FAILED tests/test_search.py::TestSearch::test_that_search_returns_results_for_irc_nickname
  93. [gw2] FAILED tests/test_search.py::TestSearch::test_that_search_returns_results_for_email_substring
  94. [gw3] FAILED tests/test_profile.py::TestProfile::test_that_user_can_modify_external_accounts_irc_nickname
  95. tests/test_search.py::TestSearch::test_search_for_not_existing_mozillian_when_logged_in
  96. tests/test_search.py::TestSearch::test_search_for_empty_string_redirects_to_search_page
  97. tests/test_search.py::TestSearch::test_vouched_user_count
  98. tests/test_search.py::TestSearch::test_search_for_not_existing_mozillian_when_not_logged_in
  99. [gw2] xfail tests/test_search.py::TestSearch::test_vouched_user_count
  100. [gw1] PASSED tests/test_search.py::TestSearch::test_search_for_empty_string_redirects_to_search_page
  101. [gw3] PASSED tests/test_search.py::TestSearch::test_search_for_not_existing_mozillian_when_not_logged_in
  102. [gw0] FAILED tests/test_search.py::TestSearch::test_search_for_not_existing_mozillian_when_logged_in
  103.  
  104. generated xml file: /home/teodora.vermesan/Desktop/parsys/mozillians-tests/results/junit.xml
  105. generated html file: /home/teodora.vermesan/Desktop/parsys/mozillians-tests/results/index.html
  106. =========================== short test summary info ============================
  107. FAIL tests/test_account.py::TestAccount::()::test_logout_verify_bid
  108. FAIL tests/test_account.py::TestAccount::()::test_login_logout
  109. FAIL tests/test_group.py::TestGroup::()::test_group_description_edit
  110. FAIL tests/test_group.py::TestGroup::()::test_group_invitations
  111. FAIL tests/test_group.py::TestGroup::()::test_group_type_change
  112. FAIL tests/test_group.py::TestGroup::()::test_group_deletion_confirmation
  113. FAIL tests/test_invite.py::TestInvite::()::test_inviting_an_invalid_email_address
  114. FAIL tests/test_profile.py::TestProfile::()::test_profile_deletion_confirmation
  115. FAIL tests/test_profile.py::TestProfile::()::test_skill_addition
  116. FAIL tests/test_profile.py::TestProfile::()::test_that_filter_by_city_works
  117. FAIL tests/test_invite.py::TestInvite::()::test_invite
  118. FAIL tests/test_profile.py::TestProfile::()::test_edit_profile_information
  119. FAIL tests/test_profile.py::TestProfile::()::test_skill_deletion
  120. FAIL tests/test_profile.py::TestProfile::()::test_that_filter_by_region_works
  121. FAIL tests/test_profile.py::TestProfile::()::test_that_filter_by_country_works
  122. FAIL tests/test_profile.py::TestProfile::()::test_that_non_us_user_can_set_get_involved_date
  123. FAIL tests/test_profile.py::TestProfile::()::test_that_user_can_create_and_delete_group
  124. FAIL tests/test_profile.py::TestProfile::()::test_private_groups_field_as_public_when_logged_in
  125. FAIL tests/test_profile.py::TestProfile::()::test_that_links_in_the_services_page_return_200_code
  126. FAIL tests/test_profile.py::TestProfile::()::test_that_user_can_view_external_accounts
  127. FAIL tests/test_profile.py::TestProfile::()::test_that_user_can_add_external_account
  128. FAIL tests/test_profile.py::TestProfile::()::test_new_user_cannot_see_groups_or_functional_areas
  129. FAIL tests/test_profile.py::TestProfile::()::test_private_groups_field_when_not_logged_in
  130. FAIL tests/test_search.py::TestSearch::()::test_that_search_returns_results_for_first_name
  131. FAIL tests/test_search.py::TestSearch::()::test_that_search_returns_results_for_irc_nickname
  132. FAIL tests/test_search.py::TestSearch::()::test_that_search_returns_results_for_email_substring
  133. FAIL tests/test_profile.py::TestProfile::()::test_that_user_can_modify_external_accounts_irc_nickname
  134. FAIL tests/test_search.py::TestSearch::()::test_search_for_not_existing_mozillian_when_logged_in
  135. XFAIL tests/test_search.py::TestSearch::()::test_vouched_user_count
  136. bug 977424 - API count and actual count do not return the same values
  137. =================================== FAILURES ===================================
  138. ______________________ TestAccount.test_logout_verify_bid ______________________
  139. [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  140. self = <tests.test_account.TestAccount instance at 0x7f254d3348c0>
  141. base_url = 'https://mozillians.allizom.org'
  142. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="58d0ae89-9d2f-42ce-acc6-28792cf02337")>
  143. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  144.  
  145. @pytest.mark.credentials
  146. @pytest.mark.nondestructive
  147. def test_logout_verify_bid(self, base_url, selenium, vouched_user):
  148. home_page = Home(base_url, selenium)
  149. > home_page.login(vouched_user['email'], vouched_user['password'])
  150.  
  151. tests/test_account.py:28:
  152. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  153. pages/base.py:56: in login
  154. pop_up.sign_in(email, password)
  155. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  156. sign_in.sign_in(email, password)
  157. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  158. self.click_next(expect='password')
  159. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  160. *self._checking_email_provider_loading_locator)
  161. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  162. 'value': value})['value']
  163. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  164. self.error_handler.check_response(response)
  165. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  166.  
  167. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254d349390>
  168. 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}]}}'}
  169.  
  170. def check_response(self, response):
  171. """
  172. Checks that a JSON response from the WebDriver does not have an error.
  173.  
  174. :Args:
  175. - response - The JSON response from the WebDriver server as a dictionary
  176. object.
  177.  
  178. :Raises: If the response contains an error message.
  179. """
  180. status = response.get('status', None)
  181. if status is None or status == ErrorCode.SUCCESS:
  182. return
  183.  
  184. value = None
  185. message = response.get("message", "")
  186. screen = response.get("screen", "")
  187. stacktrace = None
  188. if isinstance(status, int):
  189. value_json = response.get('value', None)
  190. if value_json and isinstance(value_json, basestring):
  191. import json
  192. try:
  193. value = json.loads(value_json)
  194. status = value.get('error', None)
  195. if status is None:
  196. status = value["status"]
  197. message = value["value"]
  198. if not isinstance(message, basestring):
  199. value = message
  200. try:
  201. message = message['message']
  202. except TypeError:
  203. message = None
  204. else:
  205. message = value.get('message', None)
  206. except ValueError:
  207. pass
  208.  
  209. exception_class = ErrorInResponseException
  210. if status in ErrorCode.NO_SUCH_ELEMENT:
  211. exception_class = NoSuchElementException
  212. elif status in ErrorCode.NO_SUCH_FRAME:
  213. exception_class = NoSuchFrameException
  214. elif status in ErrorCode.NO_SUCH_WINDOW:
  215. exception_class = NoSuchWindowException
  216. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  217. exception_class = StaleElementReferenceException
  218. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  219. exception_class = ElementNotVisibleException
  220. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  221. exception_class = InvalidElementStateException
  222. elif status in ErrorCode.INVALID_SELECTOR \
  223. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  224. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  225. exception_class = InvalidSelectorException
  226. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  227. exception_class = ElementNotSelectableException
  228. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  229. exception_class = WebDriverException
  230. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  231. exception_class = WebDriverException
  232. elif status in ErrorCode.TIMEOUT:
  233. exception_class = TimeoutException
  234. elif status in ErrorCode.SCRIPT_TIMEOUT:
  235. exception_class = TimeoutException
  236. elif status in ErrorCode.UNKNOWN_ERROR:
  237. exception_class = WebDriverException
  238. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  239. exception_class = UnexpectedAlertPresentException
  240. elif status in ErrorCode.NO_ALERT_OPEN:
  241. exception_class = NoAlertPresentException
  242. elif status in ErrorCode.IME_NOT_AVAILABLE:
  243. exception_class = ImeNotAvailableException
  244. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  245. exception_class = ImeActivationFailedException
  246. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  247. exception_class = MoveTargetOutOfBoundsException
  248. else:
  249. exception_class = WebDriverException
  250. if value == '' or value is None:
  251. value = response['value']
  252. if isinstance(value, basestring):
  253. if exception_class == ErrorInResponseException:
  254. raise exception_class(response, value)
  255. raise exception_class(value)
  256. if message == "" and 'message' in value:
  257. message = value['message']
  258.  
  259. screen = None
  260. if 'screen' in value:
  261. screen = value['screen']
  262.  
  263. stacktrace = None
  264. if 'stackTrace' in value and value['stackTrace']:
  265. stacktrace = []
  266. try:
  267. for frame in value['stackTrace']:
  268. line = self._value_or_default(frame, 'lineNumber', '')
  269. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  270. if line:
  271. file = "%s:%s" % (file, line)
  272. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  273. if 'className' in frame:
  274. meth = "%s.%s" % (frame['className'], meth)
  275. msg = " at %s (%s)"
  276. msg = msg % (meth, file)
  277. stacktrace.append(msg)
  278. except TypeError:
  279. pass
  280. if exception_class == ErrorInResponseException:
  281. raise exception_class(response, message)
  282. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  283. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  284. > raise exception_class(message, screen, stacktrace)
  285. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  286. E Stacktrace:
  287. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpqQfcRE/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  288. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpqQfcRE/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  289.  
  290. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  291. ------------------------------- pytest-selenium --------------------------------
  292. 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
  293. ________________________ TestAccount.test_login_logout _________________________
  294. [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  295. self = <tests.test_account.TestAccount instance at 0x7fea9ad128c0>
  296. base_url = 'https://mozillians.allizom.org'
  297. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="59fae178-e9ad-4a0d-8dc5-3d55dae1db9b")>
  298. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  299.  
  300. @pytest.mark.credentials
  301. @pytest.mark.nondestructive
  302. def test_login_logout(self, base_url, selenium, vouched_user):
  303. home_page = Home(base_url, selenium)
  304. > home_page.login(vouched_user['email'], vouched_user['password'])
  305.  
  306. tests/test_account.py:19:
  307. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  308. pages/base.py:56: in login
  309. pop_up.sign_in(email, password)
  310. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  311. sign_in.sign_in(email, password)
  312. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  313. self.click_next(expect='password')
  314. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  315. *self._checking_email_provider_loading_locator)
  316. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  317. 'value': value})['value']
  318. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  319. self.error_handler.check_response(response)
  320. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  321.  
  322. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea9ad27390>
  323. 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}]}}'}
  324.  
  325. def check_response(self, response):
  326. """
  327. Checks that a JSON response from the WebDriver does not have an error.
  328.  
  329. :Args:
  330. - response - The JSON response from the WebDriver server as a dictionary
  331. object.
  332.  
  333. :Raises: If the response contains an error message.
  334. """
  335. status = response.get('status', None)
  336. if status is None or status == ErrorCode.SUCCESS:
  337. return
  338.  
  339. value = None
  340. message = response.get("message", "")
  341. screen = response.get("screen", "")
  342. stacktrace = None
  343. if isinstance(status, int):
  344. value_json = response.get('value', None)
  345. if value_json and isinstance(value_json, basestring):
  346. import json
  347. try:
  348. value = json.loads(value_json)
  349. status = value.get('error', None)
  350. if status is None:
  351. status = value["status"]
  352. message = value["value"]
  353. if not isinstance(message, basestring):
  354. value = message
  355. try:
  356. message = message['message']
  357. except TypeError:
  358. message = None
  359. else:
  360. message = value.get('message', None)
  361. except ValueError:
  362. pass
  363.  
  364. exception_class = ErrorInResponseException
  365. if status in ErrorCode.NO_SUCH_ELEMENT:
  366. exception_class = NoSuchElementException
  367. elif status in ErrorCode.NO_SUCH_FRAME:
  368. exception_class = NoSuchFrameException
  369. elif status in ErrorCode.NO_SUCH_WINDOW:
  370. exception_class = NoSuchWindowException
  371. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  372. exception_class = StaleElementReferenceException
  373. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  374. exception_class = ElementNotVisibleException
  375. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  376. exception_class = InvalidElementStateException
  377. elif status in ErrorCode.INVALID_SELECTOR \
  378. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  379. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  380. exception_class = InvalidSelectorException
  381. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  382. exception_class = ElementNotSelectableException
  383. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  384. exception_class = WebDriverException
  385. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  386. exception_class = WebDriverException
  387. elif status in ErrorCode.TIMEOUT:
  388. exception_class = TimeoutException
  389. elif status in ErrorCode.SCRIPT_TIMEOUT:
  390. exception_class = TimeoutException
  391. elif status in ErrorCode.UNKNOWN_ERROR:
  392. exception_class = WebDriverException
  393. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  394. exception_class = UnexpectedAlertPresentException
  395. elif status in ErrorCode.NO_ALERT_OPEN:
  396. exception_class = NoAlertPresentException
  397. elif status in ErrorCode.IME_NOT_AVAILABLE:
  398. exception_class = ImeNotAvailableException
  399. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  400. exception_class = ImeActivationFailedException
  401. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  402. exception_class = MoveTargetOutOfBoundsException
  403. else:
  404. exception_class = WebDriverException
  405. if value == '' or value is None:
  406. value = response['value']
  407. if isinstance(value, basestring):
  408. if exception_class == ErrorInResponseException:
  409. raise exception_class(response, value)
  410. raise exception_class(value)
  411. if message == "" and 'message' in value:
  412. message = value['message']
  413.  
  414. screen = None
  415. if 'screen' in value:
  416. screen = value['screen']
  417.  
  418. stacktrace = None
  419. if 'stackTrace' in value and value['stackTrace']:
  420. stacktrace = []
  421. try:
  422. for frame in value['stackTrace']:
  423. line = self._value_or_default(frame, 'lineNumber', '')
  424. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  425. if line:
  426. file = "%s:%s" % (file, line)
  427. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  428. if 'className' in frame:
  429. meth = "%s.%s" % (frame['className'], meth)
  430. msg = " at %s (%s)"
  431. msg = msg % (meth, file)
  432. stacktrace.append(msg)
  433. except TypeError:
  434. pass
  435. if exception_class == ErrorInResponseException:
  436. raise exception_class(response, message)
  437. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  438. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  439. > raise exception_class(message, screen, stacktrace)
  440. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  441. E Stacktrace:
  442. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpfkNM2e/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  443. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpfkNM2e/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  444.  
  445. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  446. ------------------------------- pytest-selenium --------------------------------
  447. 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
  448. ____________________ TestGroup.test_group_description_edit _____________________
  449. [gw3] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  450. self = <tests.test_group.TestGroup instance at 0x7f362fdac518>
  451. base_url = 'https://mozillians.allizom.org'
  452. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="2e014561-611a-480a-bf5b-f753f132725c")>
  453. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  454.  
  455. @pytest.mark.credentials
  456. def test_group_description_edit(self, base_url, selenium, vouched_user):
  457. home_page = Home(base_url, selenium)
  458. > home_page.login(vouched_user['email'], vouched_user['password'])
  459.  
  460. tests/test_group.py:18:
  461. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  462. pages/base.py:56: in login
  463. pop_up.sign_in(email, password)
  464. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  465. sign_in.sign_in(email, password)
  466. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  467. self.click_next(expect='password')
  468. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  469. *self._checking_email_provider_loading_locator)
  470. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  471. 'value': value})['value']
  472. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  473. self.error_handler.check_response(response)
  474. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  475.  
  476. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f3634685110>
  477. 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}]}}'}
  478.  
  479. def check_response(self, response):
  480. """
  481. Checks that a JSON response from the WebDriver does not have an error.
  482.  
  483. :Args:
  484. - response - The JSON response from the WebDriver server as a dictionary
  485. object.
  486.  
  487. :Raises: If the response contains an error message.
  488. """
  489. status = response.get('status', None)
  490. if status is None or status == ErrorCode.SUCCESS:
  491. return
  492.  
  493. value = None
  494. message = response.get("message", "")
  495. screen = response.get("screen", "")
  496. stacktrace = None
  497. if isinstance(status, int):
  498. value_json = response.get('value', None)
  499. if value_json and isinstance(value_json, basestring):
  500. import json
  501. try:
  502. value = json.loads(value_json)
  503. status = value.get('error', None)
  504. if status is None:
  505. status = value["status"]
  506. message = value["value"]
  507. if not isinstance(message, basestring):
  508. value = message
  509. try:
  510. message = message['message']
  511. except TypeError:
  512. message = None
  513. else:
  514. message = value.get('message', None)
  515. except ValueError:
  516. pass
  517.  
  518. exception_class = ErrorInResponseException
  519. if status in ErrorCode.NO_SUCH_ELEMENT:
  520. exception_class = NoSuchElementException
  521. elif status in ErrorCode.NO_SUCH_FRAME:
  522. exception_class = NoSuchFrameException
  523. elif status in ErrorCode.NO_SUCH_WINDOW:
  524. exception_class = NoSuchWindowException
  525. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  526. exception_class = StaleElementReferenceException
  527. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  528. exception_class = ElementNotVisibleException
  529. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  530. exception_class = InvalidElementStateException
  531. elif status in ErrorCode.INVALID_SELECTOR \
  532. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  533. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  534. exception_class = InvalidSelectorException
  535. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  536. exception_class = ElementNotSelectableException
  537. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  538. exception_class = WebDriverException
  539. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  540. exception_class = WebDriverException
  541. elif status in ErrorCode.TIMEOUT:
  542. exception_class = TimeoutException
  543. elif status in ErrorCode.SCRIPT_TIMEOUT:
  544. exception_class = TimeoutException
  545. elif status in ErrorCode.UNKNOWN_ERROR:
  546. exception_class = WebDriverException
  547. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  548. exception_class = UnexpectedAlertPresentException
  549. elif status in ErrorCode.NO_ALERT_OPEN:
  550. exception_class = NoAlertPresentException
  551. elif status in ErrorCode.IME_NOT_AVAILABLE:
  552. exception_class = ImeNotAvailableException
  553. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  554. exception_class = ImeActivationFailedException
  555. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  556. exception_class = MoveTargetOutOfBoundsException
  557. else:
  558. exception_class = WebDriverException
  559. if value == '' or value is None:
  560. value = response['value']
  561. if isinstance(value, basestring):
  562. if exception_class == ErrorInResponseException:
  563. raise exception_class(response, value)
  564. raise exception_class(value)
  565. if message == "" and 'message' in value:
  566. message = value['message']
  567.  
  568. screen = None
  569. if 'screen' in value:
  570. screen = value['screen']
  571.  
  572. stacktrace = None
  573. if 'stackTrace' in value and value['stackTrace']:
  574. stacktrace = []
  575. try:
  576. for frame in value['stackTrace']:
  577. line = self._value_or_default(frame, 'lineNumber', '')
  578. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  579. if line:
  580. file = "%s:%s" % (file, line)
  581. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  582. if 'className' in frame:
  583. meth = "%s.%s" % (frame['className'], meth)
  584. msg = " at %s (%s)"
  585. msg = msg % (meth, file)
  586. stacktrace.append(msg)
  587. except TypeError:
  588. pass
  589. if exception_class == ErrorInResponseException:
  590. raise exception_class(response, message)
  591. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  592. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  593. > raise exception_class(message, screen, stacktrace)
  594. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  595. E Stacktrace:
  596. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpGEoClM/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  597. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpGEoClM/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  598.  
  599. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  600. ------------------------------- pytest-selenium --------------------------------
  601. 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
  602. _______________________ TestGroup.test_group_invitations _______________________
  603. [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  604. self = <tests.test_group.TestGroup instance at 0x7f5d191aecb0>
  605. base_url = 'https://mozillians.allizom.org'
  606. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="1ed99f09-a360-4535-a910-d85c1aa52b7e")>
  607. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  608.  
  609. @pytest.mark.credentials
  610. def test_group_invitations(self, base_url, selenium, vouched_user):
  611. home_page = Home(base_url, selenium)
  612. > home_page.login(vouched_user['email'], vouched_user['password'])
  613.  
  614. tests/test_group.py:79:
  615. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  616. pages/base.py:56: in login
  617. pop_up.sign_in(email, password)
  618. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  619. sign_in.sign_in(email, password)
  620. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  621. self.click_next(expect='password')
  622. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  623. *self._checking_email_provider_loading_locator)
  624. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  625. 'value': value})['value']
  626. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  627. self.error_handler.check_response(response)
  628. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  629.  
  630. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d19201a50>
  631. 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}]}}'}
  632.  
  633. def check_response(self, response):
  634. """
  635. Checks that a JSON response from the WebDriver does not have an error.
  636.  
  637. :Args:
  638. - response - The JSON response from the WebDriver server as a dictionary
  639. object.
  640.  
  641. :Raises: If the response contains an error message.
  642. """
  643. status = response.get('status', None)
  644. if status is None or status == ErrorCode.SUCCESS:
  645. return
  646.  
  647. value = None
  648. message = response.get("message", "")
  649. screen = response.get("screen", "")
  650. stacktrace = None
  651. if isinstance(status, int):
  652. value_json = response.get('value', None)
  653. if value_json and isinstance(value_json, basestring):
  654. import json
  655. try:
  656. value = json.loads(value_json)
  657. status = value.get('error', None)
  658. if status is None:
  659. status = value["status"]
  660. message = value["value"]
  661. if not isinstance(message, basestring):
  662. value = message
  663. try:
  664. message = message['message']
  665. except TypeError:
  666. message = None
  667. else:
  668. message = value.get('message', None)
  669. except ValueError:
  670. pass
  671.  
  672. exception_class = ErrorInResponseException
  673. if status in ErrorCode.NO_SUCH_ELEMENT:
  674. exception_class = NoSuchElementException
  675. elif status in ErrorCode.NO_SUCH_FRAME:
  676. exception_class = NoSuchFrameException
  677. elif status in ErrorCode.NO_SUCH_WINDOW:
  678. exception_class = NoSuchWindowException
  679. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  680. exception_class = StaleElementReferenceException
  681. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  682. exception_class = ElementNotVisibleException
  683. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  684. exception_class = InvalidElementStateException
  685. elif status in ErrorCode.INVALID_SELECTOR \
  686. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  687. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  688. exception_class = InvalidSelectorException
  689. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  690. exception_class = ElementNotSelectableException
  691. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  692. exception_class = WebDriverException
  693. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  694. exception_class = WebDriverException
  695. elif status in ErrorCode.TIMEOUT:
  696. exception_class = TimeoutException
  697. elif status in ErrorCode.SCRIPT_TIMEOUT:
  698. exception_class = TimeoutException
  699. elif status in ErrorCode.UNKNOWN_ERROR:
  700. exception_class = WebDriverException
  701. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  702. exception_class = UnexpectedAlertPresentException
  703. elif status in ErrorCode.NO_ALERT_OPEN:
  704. exception_class = NoAlertPresentException
  705. elif status in ErrorCode.IME_NOT_AVAILABLE:
  706. exception_class = ImeNotAvailableException
  707. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  708. exception_class = ImeActivationFailedException
  709. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  710. exception_class = MoveTargetOutOfBoundsException
  711. else:
  712. exception_class = WebDriverException
  713. if value == '' or value is None:
  714. value = response['value']
  715. if isinstance(value, basestring):
  716. if exception_class == ErrorInResponseException:
  717. raise exception_class(response, value)
  718. raise exception_class(value)
  719. if message == "" and 'message' in value:
  720. message = value['message']
  721.  
  722. screen = None
  723. if 'screen' in value:
  724. screen = value['screen']
  725.  
  726. stacktrace = None
  727. if 'stackTrace' in value and value['stackTrace']:
  728. stacktrace = []
  729. try:
  730. for frame in value['stackTrace']:
  731. line = self._value_or_default(frame, 'lineNumber', '')
  732. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  733. if line:
  734. file = "%s:%s" % (file, line)
  735. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  736. if 'className' in frame:
  737. meth = "%s.%s" % (frame['className'], meth)
  738. msg = " at %s (%s)"
  739. msg = msg % (meth, file)
  740. stacktrace.append(msg)
  741. except TypeError:
  742. pass
  743. if exception_class == ErrorInResponseException:
  744. raise exception_class(response, message)
  745. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  746. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  747. > raise exception_class(message, screen, stacktrace)
  748. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  749. E Stacktrace:
  750. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpcvQsVM/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  751. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpcvQsVM/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  752.  
  753. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  754. ------------------------------- pytest-selenium --------------------------------
  755. 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
  756. _______________________ TestGroup.test_group_type_change _______________________
  757. [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  758. self = <tests.test_group.TestGroup instance at 0x7f254c4d8cb0>
  759. base_url = 'https://mozillians.allizom.org'
  760. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="0f2c91c0-b586-4fd6-beeb-b11b4fc74db2")>
  761. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  762.  
  763. @pytest.mark.credentials
  764. def test_group_type_change(self, base_url, selenium, vouched_user):
  765. home_page = Home(base_url, selenium)
  766. > home_page.login(vouched_user['email'], vouched_user['password'])
  767.  
  768. tests/test_group.py:63:
  769. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  770. pages/base.py:56: in login
  771. pop_up.sign_in(email, password)
  772. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  773. sign_in.sign_in(email, password)
  774. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  775. self.click_next(expect='password')
  776. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  777. *self._checking_email_provider_loading_locator)
  778. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  779. 'value': value})['value']
  780. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  781. self.error_handler.check_response(response)
  782. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  783.  
  784. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254c616110>
  785. 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}]}}'}
  786.  
  787. def check_response(self, response):
  788. """
  789. Checks that a JSON response from the WebDriver does not have an error.
  790.  
  791. :Args:
  792. - response - The JSON response from the WebDriver server as a dictionary
  793. object.
  794.  
  795. :Raises: If the response contains an error message.
  796. """
  797. status = response.get('status', None)
  798. if status is None or status == ErrorCode.SUCCESS:
  799. return
  800.  
  801. value = None
  802. message = response.get("message", "")
  803. screen = response.get("screen", "")
  804. stacktrace = None
  805. if isinstance(status, int):
  806. value_json = response.get('value', None)
  807. if value_json and isinstance(value_json, basestring):
  808. import json
  809. try:
  810. value = json.loads(value_json)
  811. status = value.get('error', None)
  812. if status is None:
  813. status = value["status"]
  814. message = value["value"]
  815. if not isinstance(message, basestring):
  816. value = message
  817. try:
  818. message = message['message']
  819. except TypeError:
  820. message = None
  821. else:
  822. message = value.get('message', None)
  823. except ValueError:
  824. pass
  825.  
  826. exception_class = ErrorInResponseException
  827. if status in ErrorCode.NO_SUCH_ELEMENT:
  828. exception_class = NoSuchElementException
  829. elif status in ErrorCode.NO_SUCH_FRAME:
  830. exception_class = NoSuchFrameException
  831. elif status in ErrorCode.NO_SUCH_WINDOW:
  832. exception_class = NoSuchWindowException
  833. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  834. exception_class = StaleElementReferenceException
  835. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  836. exception_class = ElementNotVisibleException
  837. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  838. exception_class = InvalidElementStateException
  839. elif status in ErrorCode.INVALID_SELECTOR \
  840. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  841. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  842. exception_class = InvalidSelectorException
  843. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  844. exception_class = ElementNotSelectableException
  845. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  846. exception_class = WebDriverException
  847. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  848. exception_class = WebDriverException
  849. elif status in ErrorCode.TIMEOUT:
  850. exception_class = TimeoutException
  851. elif status in ErrorCode.SCRIPT_TIMEOUT:
  852. exception_class = TimeoutException
  853. elif status in ErrorCode.UNKNOWN_ERROR:
  854. exception_class = WebDriverException
  855. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  856. exception_class = UnexpectedAlertPresentException
  857. elif status in ErrorCode.NO_ALERT_OPEN:
  858. exception_class = NoAlertPresentException
  859. elif status in ErrorCode.IME_NOT_AVAILABLE:
  860. exception_class = ImeNotAvailableException
  861. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  862. exception_class = ImeActivationFailedException
  863. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  864. exception_class = MoveTargetOutOfBoundsException
  865. else:
  866. exception_class = WebDriverException
  867. if value == '' or value is None:
  868. value = response['value']
  869. if isinstance(value, basestring):
  870. if exception_class == ErrorInResponseException:
  871. raise exception_class(response, value)
  872. raise exception_class(value)
  873. if message == "" and 'message' in value:
  874. message = value['message']
  875.  
  876. screen = None
  877. if 'screen' in value:
  878. screen = value['screen']
  879.  
  880. stacktrace = None
  881. if 'stackTrace' in value and value['stackTrace']:
  882. stacktrace = []
  883. try:
  884. for frame in value['stackTrace']:
  885. line = self._value_or_default(frame, 'lineNumber', '')
  886. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  887. if line:
  888. file = "%s:%s" % (file, line)
  889. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  890. if 'className' in frame:
  891. meth = "%s.%s" % (frame['className'], meth)
  892. msg = " at %s (%s)"
  893. msg = msg % (meth, file)
  894. stacktrace.append(msg)
  895. except TypeError:
  896. pass
  897. if exception_class == ErrorInResponseException:
  898. raise exception_class(response, message)
  899. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  900. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  901. > raise exception_class(message, screen, stacktrace)
  902. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  903. E Stacktrace:
  904. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpS5OV3K/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  905. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpS5OV3K/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  906.  
  907. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  908. ------------------------------- pytest-selenium --------------------------------
  909. 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
  910. __________________ TestGroup.test_group_deletion_confirmation __________________
  911. [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  912. self = <tests.test_group.TestGroup instance at 0x7fea99eb6b90>
  913. base_url = 'https://mozillians.allizom.org'
  914. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="be8d057e-d2fd-4ea1-a875-4df9c2a679d1")>
  915. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  916.  
  917. @pytest.mark.credentials
  918. def test_group_deletion_confirmation(self, base_url, selenium, vouched_user):
  919. home_page = Home(base_url, selenium)
  920. > home_page.login(vouched_user['email'], vouched_user['password'])
  921.  
  922. tests/test_group.py:45:
  923. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  924. pages/base.py:56: in login
  925. pop_up.sign_in(email, password)
  926. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  927. sign_in.sign_in(email, password)
  928. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  929. self.click_next(expect='password')
  930. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  931. *self._checking_email_provider_loading_locator)
  932. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  933. 'value': value})['value']
  934. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  935. self.error_handler.check_response(response)
  936. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  937.  
  938. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea99ff4110>
  939. 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}]}}'}
  940.  
  941. def check_response(self, response):
  942. """
  943. Checks that a JSON response from the WebDriver does not have an error.
  944.  
  945. :Args:
  946. - response - The JSON response from the WebDriver server as a dictionary
  947. object.
  948.  
  949. :Raises: If the response contains an error message.
  950. """
  951. status = response.get('status', None)
  952. if status is None or status == ErrorCode.SUCCESS:
  953. return
  954.  
  955. value = None
  956. message = response.get("message", "")
  957. screen = response.get("screen", "")
  958. stacktrace = None
  959. if isinstance(status, int):
  960. value_json = response.get('value', None)
  961. if value_json and isinstance(value_json, basestring):
  962. import json
  963. try:
  964. value = json.loads(value_json)
  965. status = value.get('error', None)
  966. if status is None:
  967. status = value["status"]
  968. message = value["value"]
  969. if not isinstance(message, basestring):
  970. value = message
  971. try:
  972. message = message['message']
  973. except TypeError:
  974. message = None
  975. else:
  976. message = value.get('message', None)
  977. except ValueError:
  978. pass
  979.  
  980. exception_class = ErrorInResponseException
  981. if status in ErrorCode.NO_SUCH_ELEMENT:
  982. exception_class = NoSuchElementException
  983. elif status in ErrorCode.NO_SUCH_FRAME:
  984. exception_class = NoSuchFrameException
  985. elif status in ErrorCode.NO_SUCH_WINDOW:
  986. exception_class = NoSuchWindowException
  987. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  988. exception_class = StaleElementReferenceException
  989. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  990. exception_class = ElementNotVisibleException
  991. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  992. exception_class = InvalidElementStateException
  993. elif status in ErrorCode.INVALID_SELECTOR \
  994. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  995. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  996. exception_class = InvalidSelectorException
  997. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  998. exception_class = ElementNotSelectableException
  999. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  1000. exception_class = WebDriverException
  1001. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  1002. exception_class = WebDriverException
  1003. elif status in ErrorCode.TIMEOUT:
  1004. exception_class = TimeoutException
  1005. elif status in ErrorCode.SCRIPT_TIMEOUT:
  1006. exception_class = TimeoutException
  1007. elif status in ErrorCode.UNKNOWN_ERROR:
  1008. exception_class = WebDriverException
  1009. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  1010. exception_class = UnexpectedAlertPresentException
  1011. elif status in ErrorCode.NO_ALERT_OPEN:
  1012. exception_class = NoAlertPresentException
  1013. elif status in ErrorCode.IME_NOT_AVAILABLE:
  1014. exception_class = ImeNotAvailableException
  1015. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  1016. exception_class = ImeActivationFailedException
  1017. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  1018. exception_class = MoveTargetOutOfBoundsException
  1019. else:
  1020. exception_class = WebDriverException
  1021. if value == '' or value is None:
  1022. value = response['value']
  1023. if isinstance(value, basestring):
  1024. if exception_class == ErrorInResponseException:
  1025. raise exception_class(response, value)
  1026. raise exception_class(value)
  1027. if message == "" and 'message' in value:
  1028. message = value['message']
  1029.  
  1030. screen = None
  1031. if 'screen' in value:
  1032. screen = value['screen']
  1033.  
  1034. stacktrace = None
  1035. if 'stackTrace' in value and value['stackTrace']:
  1036. stacktrace = []
  1037. try:
  1038. for frame in value['stackTrace']:
  1039. line = self._value_or_default(frame, 'lineNumber', '')
  1040. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  1041. if line:
  1042. file = "%s:%s" % (file, line)
  1043. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  1044. if 'className' in frame:
  1045. meth = "%s.%s" % (frame['className'], meth)
  1046. msg = " at %s (%s)"
  1047. msg = msg % (meth, file)
  1048. stacktrace.append(msg)
  1049. except TypeError:
  1050. pass
  1051. if exception_class == ErrorInResponseException:
  1052. raise exception_class(response, message)
  1053. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  1054. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  1055. > raise exception_class(message, screen, stacktrace)
  1056. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  1057. E Stacktrace:
  1058. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpZOj6wq/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  1059. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpZOj6wq/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  1060.  
  1061. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  1062. ------------------------------- pytest-selenium --------------------------------
  1063. 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
  1064. ______________ TestInvite.test_inviting_an_invalid_email_address _______________
  1065. [gw3] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  1066. self = <tests.test_invite.TestInvite instance at 0x7f362f806b48>
  1067. base_url = 'https://mozillians.allizom.org'
  1068. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="7887bbbf-aa82-4aa9-8838-c5553e4f83d7")>
  1069. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  1070.  
  1071. @pytest.mark.credentials
  1072. def test_inviting_an_invalid_email_address(self, base_url, selenium, vouched_user):
  1073. home_page = Home(base_url, selenium)
  1074. > home_page.login(vouched_user['email'], vouched_user['password'])
  1075.  
  1076. tests/test_invite.py:17:
  1077. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1078. pages/base.py:56: in login
  1079. pop_up.sign_in(email, password)
  1080. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  1081. sign_in.sign_in(email, password)
  1082. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  1083. self.click_next(expect='password')
  1084. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  1085. *self._checking_email_provider_loading_locator)
  1086. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  1087. 'value': value})['value']
  1088. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  1089. self.error_handler.check_response(response)
  1090. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1091.  
  1092. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f362f936d90>
  1093. 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}]}}'}
  1094.  
  1095. def check_response(self, response):
  1096. """
  1097. Checks that a JSON response from the WebDriver does not have an error.
  1098.  
  1099. :Args:
  1100. - response - The JSON response from the WebDriver server as a dictionary
  1101. object.
  1102.  
  1103. :Raises: If the response contains an error message.
  1104. """
  1105. status = response.get('status', None)
  1106. if status is None or status == ErrorCode.SUCCESS:
  1107. return
  1108.  
  1109. value = None
  1110. message = response.get("message", "")
  1111. screen = response.get("screen", "")
  1112. stacktrace = None
  1113. if isinstance(status, int):
  1114. value_json = response.get('value', None)
  1115. if value_json and isinstance(value_json, basestring):
  1116. import json
  1117. try:
  1118. value = json.loads(value_json)
  1119. status = value.get('error', None)
  1120. if status is None:
  1121. status = value["status"]
  1122. message = value["value"]
  1123. if not isinstance(message, basestring):
  1124. value = message
  1125. try:
  1126. message = message['message']
  1127. except TypeError:
  1128. message = None
  1129. else:
  1130. message = value.get('message', None)
  1131. except ValueError:
  1132. pass
  1133.  
  1134. exception_class = ErrorInResponseException
  1135. if status in ErrorCode.NO_SUCH_ELEMENT:
  1136. exception_class = NoSuchElementException
  1137. elif status in ErrorCode.NO_SUCH_FRAME:
  1138. exception_class = NoSuchFrameException
  1139. elif status in ErrorCode.NO_SUCH_WINDOW:
  1140. exception_class = NoSuchWindowException
  1141. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  1142. exception_class = StaleElementReferenceException
  1143. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  1144. exception_class = ElementNotVisibleException
  1145. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  1146. exception_class = InvalidElementStateException
  1147. elif status in ErrorCode.INVALID_SELECTOR \
  1148. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  1149. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  1150. exception_class = InvalidSelectorException
  1151. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  1152. exception_class = ElementNotSelectableException
  1153. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  1154. exception_class = WebDriverException
  1155. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  1156. exception_class = WebDriverException
  1157. elif status in ErrorCode.TIMEOUT:
  1158. exception_class = TimeoutException
  1159. elif status in ErrorCode.SCRIPT_TIMEOUT:
  1160. exception_class = TimeoutException
  1161. elif status in ErrorCode.UNKNOWN_ERROR:
  1162. exception_class = WebDriverException
  1163. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  1164. exception_class = UnexpectedAlertPresentException
  1165. elif status in ErrorCode.NO_ALERT_OPEN:
  1166. exception_class = NoAlertPresentException
  1167. elif status in ErrorCode.IME_NOT_AVAILABLE:
  1168. exception_class = ImeNotAvailableException
  1169. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  1170. exception_class = ImeActivationFailedException
  1171. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  1172. exception_class = MoveTargetOutOfBoundsException
  1173. else:
  1174. exception_class = WebDriverException
  1175. if value == '' or value is None:
  1176. value = response['value']
  1177. if isinstance(value, basestring):
  1178. if exception_class == ErrorInResponseException:
  1179. raise exception_class(response, value)
  1180. raise exception_class(value)
  1181. if message == "" and 'message' in value:
  1182. message = value['message']
  1183.  
  1184. screen = None
  1185. if 'screen' in value:
  1186. screen = value['screen']
  1187.  
  1188. stacktrace = None
  1189. if 'stackTrace' in value and value['stackTrace']:
  1190. stacktrace = []
  1191. try:
  1192. for frame in value['stackTrace']:
  1193. line = self._value_or_default(frame, 'lineNumber', '')
  1194. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  1195. if line:
  1196. file = "%s:%s" % (file, line)
  1197. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  1198. if 'className' in frame:
  1199. meth = "%s.%s" % (frame['className'], meth)
  1200. msg = " at %s (%s)"
  1201. msg = msg % (meth, file)
  1202. stacktrace.append(msg)
  1203. except TypeError:
  1204. pass
  1205. if exception_class == ErrorInResponseException:
  1206. raise exception_class(response, message)
  1207. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  1208. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  1209. > raise exception_class(message, screen, stacktrace)
  1210. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  1211. E Stacktrace:
  1212. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpo482gQ/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  1213. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpo482gQ/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  1214.  
  1215. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  1216. ------------------------------- pytest-selenium --------------------------------
  1217. 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
  1218. ________________ TestProfile.test_profile_deletion_confirmation ________________
  1219. [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  1220. self = <tests.test_profile.TestProfile instance at 0x7f5d191a0a70>
  1221. base_url = 'https://mozillians.allizom.org'
  1222. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="8333cfd8-ac3b-47c6-bfc2-76d2b8abd6b4")>
  1223. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  1224.  
  1225. @pytest.mark.credentials
  1226. @pytest.mark.nondestructive
  1227. def test_profile_deletion_confirmation(self, base_url, selenium, vouched_user):
  1228. home_page = Home(base_url, selenium)
  1229. > home_page.login(vouched_user['email'], vouched_user['password'])
  1230.  
  1231. tests/test_profile.py:21:
  1232. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1233. pages/base.py:56: in login
  1234. pop_up.sign_in(email, password)
  1235. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  1236. sign_in.sign_in(email, password)
  1237. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  1238. self.click_next(expect='password')
  1239. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  1240. *self._checking_email_provider_loading_locator)
  1241. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  1242. 'value': value})['value']
  1243. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  1244. self.error_handler.check_response(response)
  1245. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1246.  
  1247. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d191b3710>
  1248. 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}]}}'}
  1249.  
  1250. def check_response(self, response):
  1251. """
  1252. Checks that a JSON response from the WebDriver does not have an error.
  1253.  
  1254. :Args:
  1255. - response - The JSON response from the WebDriver server as a dictionary
  1256. object.
  1257.  
  1258. :Raises: If the response contains an error message.
  1259. """
  1260. status = response.get('status', None)
  1261. if status is None or status == ErrorCode.SUCCESS:
  1262. return
  1263.  
  1264. value = None
  1265. message = response.get("message", "")
  1266. screen = response.get("screen", "")
  1267. stacktrace = None
  1268. if isinstance(status, int):
  1269. value_json = response.get('value', None)
  1270. if value_json and isinstance(value_json, basestring):
  1271. import json
  1272. try:
  1273. value = json.loads(value_json)
  1274. status = value.get('error', None)
  1275. if status is None:
  1276. status = value["status"]
  1277. message = value["value"]
  1278. if not isinstance(message, basestring):
  1279. value = message
  1280. try:
  1281. message = message['message']
  1282. except TypeError:
  1283. message = None
  1284. else:
  1285. message = value.get('message', None)
  1286. except ValueError:
  1287. pass
  1288.  
  1289. exception_class = ErrorInResponseException
  1290. if status in ErrorCode.NO_SUCH_ELEMENT:
  1291. exception_class = NoSuchElementException
  1292. elif status in ErrorCode.NO_SUCH_FRAME:
  1293. exception_class = NoSuchFrameException
  1294. elif status in ErrorCode.NO_SUCH_WINDOW:
  1295. exception_class = NoSuchWindowException
  1296. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  1297. exception_class = StaleElementReferenceException
  1298. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  1299. exception_class = ElementNotVisibleException
  1300. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  1301. exception_class = InvalidElementStateException
  1302. elif status in ErrorCode.INVALID_SELECTOR \
  1303. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  1304. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  1305. exception_class = InvalidSelectorException
  1306. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  1307. exception_class = ElementNotSelectableException
  1308. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  1309. exception_class = WebDriverException
  1310. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  1311. exception_class = WebDriverException
  1312. elif status in ErrorCode.TIMEOUT:
  1313. exception_class = TimeoutException
  1314. elif status in ErrorCode.SCRIPT_TIMEOUT:
  1315. exception_class = TimeoutException
  1316. elif status in ErrorCode.UNKNOWN_ERROR:
  1317. exception_class = WebDriverException
  1318. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  1319. exception_class = UnexpectedAlertPresentException
  1320. elif status in ErrorCode.NO_ALERT_OPEN:
  1321. exception_class = NoAlertPresentException
  1322. elif status in ErrorCode.IME_NOT_AVAILABLE:
  1323. exception_class = ImeNotAvailableException
  1324. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  1325. exception_class = ImeActivationFailedException
  1326. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  1327. exception_class = MoveTargetOutOfBoundsException
  1328. else:
  1329. exception_class = WebDriverException
  1330. if value == '' or value is None:
  1331. value = response['value']
  1332. if isinstance(value, basestring):
  1333. if exception_class == ErrorInResponseException:
  1334. raise exception_class(response, value)
  1335. raise exception_class(value)
  1336. if message == "" and 'message' in value:
  1337. message = value['message']
  1338.  
  1339. screen = None
  1340. if 'screen' in value:
  1341. screen = value['screen']
  1342.  
  1343. stacktrace = None
  1344. if 'stackTrace' in value and value['stackTrace']:
  1345. stacktrace = []
  1346. try:
  1347. for frame in value['stackTrace']:
  1348. line = self._value_or_default(frame, 'lineNumber', '')
  1349. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  1350. if line:
  1351. file = "%s:%s" % (file, line)
  1352. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  1353. if 'className' in frame:
  1354. meth = "%s.%s" % (frame['className'], meth)
  1355. msg = " at %s (%s)"
  1356. msg = msg % (meth, file)
  1357. stacktrace.append(msg)
  1358. except TypeError:
  1359. pass
  1360. if exception_class == ErrorInResponseException:
  1361. raise exception_class(response, message)
  1362. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  1363. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  1364. > raise exception_class(message, screen, stacktrace)
  1365. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  1366. E Stacktrace:
  1367. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpaaPc9c/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  1368. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpaaPc9c/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  1369.  
  1370. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  1371. ------------------------------- pytest-selenium --------------------------------
  1372. 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
  1373. _______________________ TestProfile.test_skill_addition ________________________
  1374. [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  1375. self = <tests.test_profile.TestProfile instance at 0x7f254c63f3f8>
  1376. base_url = 'https://mozillians.allizom.org'
  1377. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="16b31876-89a0-4012-ab10-e05953d21628")>
  1378. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  1379.  
  1380. @pytest.mark.credentials
  1381. def test_skill_addition(self, base_url, selenium, vouched_user):
  1382. home_page = Home(base_url, selenium)
  1383. > home_page.login(vouched_user['email'], vouched_user['password'])
  1384.  
  1385. tests/test_profile.py:64:
  1386. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1387. pages/base.py:56: in login
  1388. pop_up.sign_in(email, password)
  1389. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  1390. sign_in.sign_in(email, password)
  1391. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  1392. self.click_next(expect='password')
  1393. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  1394. *self._checking_email_provider_loading_locator)
  1395. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  1396. 'value': value})['value']
  1397. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  1398. self.error_handler.check_response(response)
  1399. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1400.  
  1401. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254c6169d0>
  1402. 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}]}}'}
  1403.  
  1404. def check_response(self, response):
  1405. """
  1406. Checks that a JSON response from the WebDriver does not have an error.
  1407.  
  1408. :Args:
  1409. - response - The JSON response from the WebDriver server as a dictionary
  1410. object.
  1411.  
  1412. :Raises: If the response contains an error message.
  1413. """
  1414. status = response.get('status', None)
  1415. if status is None or status == ErrorCode.SUCCESS:
  1416. return
  1417.  
  1418. value = None
  1419. message = response.get("message", "")
  1420. screen = response.get("screen", "")
  1421. stacktrace = None
  1422. if isinstance(status, int):
  1423. value_json = response.get('value', None)
  1424. if value_json and isinstance(value_json, basestring):
  1425. import json
  1426. try:
  1427. value = json.loads(value_json)
  1428. status = value.get('error', None)
  1429. if status is None:
  1430. status = value["status"]
  1431. message = value["value"]
  1432. if not isinstance(message, basestring):
  1433. value = message
  1434. try:
  1435. message = message['message']
  1436. except TypeError:
  1437. message = None
  1438. else:
  1439. message = value.get('message', None)
  1440. except ValueError:
  1441. pass
  1442.  
  1443. exception_class = ErrorInResponseException
  1444. if status in ErrorCode.NO_SUCH_ELEMENT:
  1445. exception_class = NoSuchElementException
  1446. elif status in ErrorCode.NO_SUCH_FRAME:
  1447. exception_class = NoSuchFrameException
  1448. elif status in ErrorCode.NO_SUCH_WINDOW:
  1449. exception_class = NoSuchWindowException
  1450. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  1451. exception_class = StaleElementReferenceException
  1452. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  1453. exception_class = ElementNotVisibleException
  1454. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  1455. exception_class = InvalidElementStateException
  1456. elif status in ErrorCode.INVALID_SELECTOR \
  1457. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  1458. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  1459. exception_class = InvalidSelectorException
  1460. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  1461. exception_class = ElementNotSelectableException
  1462. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  1463. exception_class = WebDriverException
  1464. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  1465. exception_class = WebDriverException
  1466. elif status in ErrorCode.TIMEOUT:
  1467. exception_class = TimeoutException
  1468. elif status in ErrorCode.SCRIPT_TIMEOUT:
  1469. exception_class = TimeoutException
  1470. elif status in ErrorCode.UNKNOWN_ERROR:
  1471. exception_class = WebDriverException
  1472. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  1473. exception_class = UnexpectedAlertPresentException
  1474. elif status in ErrorCode.NO_ALERT_OPEN:
  1475. exception_class = NoAlertPresentException
  1476. elif status in ErrorCode.IME_NOT_AVAILABLE:
  1477. exception_class = ImeNotAvailableException
  1478. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  1479. exception_class = ImeActivationFailedException
  1480. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  1481. exception_class = MoveTargetOutOfBoundsException
  1482. else:
  1483. exception_class = WebDriverException
  1484. if value == '' or value is None:
  1485. value = response['value']
  1486. if isinstance(value, basestring):
  1487. if exception_class == ErrorInResponseException:
  1488. raise exception_class(response, value)
  1489. raise exception_class(value)
  1490. if message == "" and 'message' in value:
  1491. message = value['message']
  1492.  
  1493. screen = None
  1494. if 'screen' in value:
  1495. screen = value['screen']
  1496.  
  1497. stacktrace = None
  1498. if 'stackTrace' in value and value['stackTrace']:
  1499. stacktrace = []
  1500. try:
  1501. for frame in value['stackTrace']:
  1502. line = self._value_or_default(frame, 'lineNumber', '')
  1503. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  1504. if line:
  1505. file = "%s:%s" % (file, line)
  1506. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  1507. if 'className' in frame:
  1508. meth = "%s.%s" % (frame['className'], meth)
  1509. msg = " at %s (%s)"
  1510. msg = msg % (meth, file)
  1511. stacktrace.append(msg)
  1512. except TypeError:
  1513. pass
  1514. if exception_class == ErrorInResponseException:
  1515. raise exception_class(response, message)
  1516. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  1517. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  1518. > raise exception_class(message, screen, stacktrace)
  1519. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  1520. E Stacktrace:
  1521. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpTpOv6F/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  1522. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpTpOv6F/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  1523.  
  1524. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  1525. ------------------------------- pytest-selenium --------------------------------
  1526. 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
  1527. __________________ TestProfile.test_that_filter_by_city_works __________________
  1528. [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  1529. self = <tests.test_profile.TestProfile instance at 0x7fea9a01d5a8>
  1530. base_url = 'https://mozillians.allizom.org'
  1531. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="567d842e-f413-4fa1-b990-9eb379c8de53")>
  1532. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  1533.  
  1534. @pytest.mark.credentials
  1535. @pytest.mark.nondestructive
  1536. def test_that_filter_by_city_works(self, base_url, selenium, vouched_user):
  1537. home_page = Home(base_url, selenium)
  1538. > home_page.login(vouched_user['email'], vouched_user['password'])
  1539.  
  1540. tests/test_profile.py:105:
  1541. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1542. pages/base.py:56: in login
  1543. pop_up.sign_in(email, password)
  1544. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  1545. sign_in.sign_in(email, password)
  1546. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  1547. self.click_next(expect='password')
  1548. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  1549. *self._checking_email_provider_loading_locator)
  1550. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  1551. 'value': value})['value']
  1552. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  1553. self.error_handler.check_response(response)
  1554. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1555.  
  1556. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea99ff49d0>
  1557. 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}]}}'}
  1558.  
  1559. def check_response(self, response):
  1560. """
  1561. Checks that a JSON response from the WebDriver does not have an error.
  1562.  
  1563. :Args:
  1564. - response - The JSON response from the WebDriver server as a dictionary
  1565. object.
  1566.  
  1567. :Raises: If the response contains an error message.
  1568. """
  1569. status = response.get('status', None)
  1570. if status is None or status == ErrorCode.SUCCESS:
  1571. return
  1572.  
  1573. value = None
  1574. message = response.get("message", "")
  1575. screen = response.get("screen", "")
  1576. stacktrace = None
  1577. if isinstance(status, int):
  1578. value_json = response.get('value', None)
  1579. if value_json and isinstance(value_json, basestring):
  1580. import json
  1581. try:
  1582. value = json.loads(value_json)
  1583. status = value.get('error', None)
  1584. if status is None:
  1585. status = value["status"]
  1586. message = value["value"]
  1587. if not isinstance(message, basestring):
  1588. value = message
  1589. try:
  1590. message = message['message']
  1591. except TypeError:
  1592. message = None
  1593. else:
  1594. message = value.get('message', None)
  1595. except ValueError:
  1596. pass
  1597.  
  1598. exception_class = ErrorInResponseException
  1599. if status in ErrorCode.NO_SUCH_ELEMENT:
  1600. exception_class = NoSuchElementException
  1601. elif status in ErrorCode.NO_SUCH_FRAME:
  1602. exception_class = NoSuchFrameException
  1603. elif status in ErrorCode.NO_SUCH_WINDOW:
  1604. exception_class = NoSuchWindowException
  1605. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  1606. exception_class = StaleElementReferenceException
  1607. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  1608. exception_class = ElementNotVisibleException
  1609. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  1610. exception_class = InvalidElementStateException
  1611. elif status in ErrorCode.INVALID_SELECTOR \
  1612. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  1613. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  1614. exception_class = InvalidSelectorException
  1615. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  1616. exception_class = ElementNotSelectableException
  1617. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  1618. exception_class = WebDriverException
  1619. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  1620. exception_class = WebDriverException
  1621. elif status in ErrorCode.TIMEOUT:
  1622. exception_class = TimeoutException
  1623. elif status in ErrorCode.SCRIPT_TIMEOUT:
  1624. exception_class = TimeoutException
  1625. elif status in ErrorCode.UNKNOWN_ERROR:
  1626. exception_class = WebDriverException
  1627. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  1628. exception_class = UnexpectedAlertPresentException
  1629. elif status in ErrorCode.NO_ALERT_OPEN:
  1630. exception_class = NoAlertPresentException
  1631. elif status in ErrorCode.IME_NOT_AVAILABLE:
  1632. exception_class = ImeNotAvailableException
  1633. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  1634. exception_class = ImeActivationFailedException
  1635. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  1636. exception_class = MoveTargetOutOfBoundsException
  1637. else:
  1638. exception_class = WebDriverException
  1639. if value == '' or value is None:
  1640. value = response['value']
  1641. if isinstance(value, basestring):
  1642. if exception_class == ErrorInResponseException:
  1643. raise exception_class(response, value)
  1644. raise exception_class(value)
  1645. if message == "" and 'message' in value:
  1646. message = value['message']
  1647.  
  1648. screen = None
  1649. if 'screen' in value:
  1650. screen = value['screen']
  1651.  
  1652. stacktrace = None
  1653. if 'stackTrace' in value and value['stackTrace']:
  1654. stacktrace = []
  1655. try:
  1656. for frame in value['stackTrace']:
  1657. line = self._value_or_default(frame, 'lineNumber', '')
  1658. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  1659. if line:
  1660. file = "%s:%s" % (file, line)
  1661. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  1662. if 'className' in frame:
  1663. meth = "%s.%s" % (frame['className'], meth)
  1664. msg = " at %s (%s)"
  1665. msg = msg % (meth, file)
  1666. stacktrace.append(msg)
  1667. except TypeError:
  1668. pass
  1669. if exception_class == ErrorInResponseException:
  1670. raise exception_class(response, message)
  1671. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  1672. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  1673. > raise exception_class(message, screen, stacktrace)
  1674. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  1675. E Stacktrace:
  1676. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpEX16iM/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  1677. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpEX16iM/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  1678.  
  1679. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  1680. ------------------------------- pytest-selenium --------------------------------
  1681. 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
  1682. ____________________________ TestInvite.test_invite ____________________________
  1683. [gw3] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  1684. self = <tests.test_invite.TestInvite instance at 0x7f362fda6a70>
  1685. base_url = 'https://mozillians.allizom.org'
  1686. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="3bf83b05-f927-4473-a314-5bd17c2a4fc0")>
  1687. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  1688.  
  1689. @pytest.mark.credentials
  1690. def test_invite(self, base_url, selenium, vouched_user):
  1691. home_page = Home(base_url, selenium)
  1692. > home_page.login(vouched_user['email'], vouched_user['password'])
  1693.  
  1694. tests/test_invite.py:25:
  1695. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1696. pages/base.py:56: in login
  1697. pop_up.sign_in(email, password)
  1698. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  1699. sign_in.sign_in(email, password)
  1700. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  1701. self.click_next(expect='password')
  1702. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  1703. *self._checking_email_provider_loading_locator)
  1704. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  1705. 'value': value})['value']
  1706. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  1707. self.error_handler.check_response(response)
  1708. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1709.  
  1710. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f362f901c90>
  1711. 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}]}}'}
  1712.  
  1713. def check_response(self, response):
  1714. """
  1715. Checks that a JSON response from the WebDriver does not have an error.
  1716.  
  1717. :Args:
  1718. - response - The JSON response from the WebDriver server as a dictionary
  1719. object.
  1720.  
  1721. :Raises: If the response contains an error message.
  1722. """
  1723. status = response.get('status', None)
  1724. if status is None or status == ErrorCode.SUCCESS:
  1725. return
  1726.  
  1727. value = None
  1728. message = response.get("message", "")
  1729. screen = response.get("screen", "")
  1730. stacktrace = None
  1731. if isinstance(status, int):
  1732. value_json = response.get('value', None)
  1733. if value_json and isinstance(value_json, basestring):
  1734. import json
  1735. try:
  1736. value = json.loads(value_json)
  1737. status = value.get('error', None)
  1738. if status is None:
  1739. status = value["status"]
  1740. message = value["value"]
  1741. if not isinstance(message, basestring):
  1742. value = message
  1743. try:
  1744. message = message['message']
  1745. except TypeError:
  1746. message = None
  1747. else:
  1748. message = value.get('message', None)
  1749. except ValueError:
  1750. pass
  1751.  
  1752. exception_class = ErrorInResponseException
  1753. if status in ErrorCode.NO_SUCH_ELEMENT:
  1754. exception_class = NoSuchElementException
  1755. elif status in ErrorCode.NO_SUCH_FRAME:
  1756. exception_class = NoSuchFrameException
  1757. elif status in ErrorCode.NO_SUCH_WINDOW:
  1758. exception_class = NoSuchWindowException
  1759. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  1760. exception_class = StaleElementReferenceException
  1761. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  1762. exception_class = ElementNotVisibleException
  1763. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  1764. exception_class = InvalidElementStateException
  1765. elif status in ErrorCode.INVALID_SELECTOR \
  1766. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  1767. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  1768. exception_class = InvalidSelectorException
  1769. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  1770. exception_class = ElementNotSelectableException
  1771. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  1772. exception_class = WebDriverException
  1773. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  1774. exception_class = WebDriverException
  1775. elif status in ErrorCode.TIMEOUT:
  1776. exception_class = TimeoutException
  1777. elif status in ErrorCode.SCRIPT_TIMEOUT:
  1778. exception_class = TimeoutException
  1779. elif status in ErrorCode.UNKNOWN_ERROR:
  1780. exception_class = WebDriverException
  1781. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  1782. exception_class = UnexpectedAlertPresentException
  1783. elif status in ErrorCode.NO_ALERT_OPEN:
  1784. exception_class = NoAlertPresentException
  1785. elif status in ErrorCode.IME_NOT_AVAILABLE:
  1786. exception_class = ImeNotAvailableException
  1787. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  1788. exception_class = ImeActivationFailedException
  1789. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  1790. exception_class = MoveTargetOutOfBoundsException
  1791. else:
  1792. exception_class = WebDriverException
  1793. if value == '' or value is None:
  1794. value = response['value']
  1795. if isinstance(value, basestring):
  1796. if exception_class == ErrorInResponseException:
  1797. raise exception_class(response, value)
  1798. raise exception_class(value)
  1799. if message == "" and 'message' in value:
  1800. message = value['message']
  1801.  
  1802. screen = None
  1803. if 'screen' in value:
  1804. screen = value['screen']
  1805.  
  1806. stacktrace = None
  1807. if 'stackTrace' in value and value['stackTrace']:
  1808. stacktrace = []
  1809. try:
  1810. for frame in value['stackTrace']:
  1811. line = self._value_or_default(frame, 'lineNumber', '')
  1812. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  1813. if line:
  1814. file = "%s:%s" % (file, line)
  1815. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  1816. if 'className' in frame:
  1817. meth = "%s.%s" % (frame['className'], meth)
  1818. msg = " at %s (%s)"
  1819. msg = msg % (meth, file)
  1820. stacktrace.append(msg)
  1821. except TypeError:
  1822. pass
  1823. if exception_class == ErrorInResponseException:
  1824. raise exception_class(response, message)
  1825. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  1826. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  1827. > raise exception_class(message, screen, stacktrace)
  1828. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  1829. E Stacktrace:
  1830. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpaGvGHq/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  1831. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpaGvGHq/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  1832.  
  1833. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  1834. ------------------------------- pytest-selenium --------------------------------
  1835. 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
  1836. __________________ TestProfile.test_edit_profile_information ___________________
  1837. [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  1838. self = <tests.test_profile.TestProfile instance at 0x7f5d19024e60>
  1839. base_url = 'https://mozillians.allizom.org'
  1840. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="a5478f83-5bbc-4363-9132-dfab2d84b0eb")>
  1841. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  1842.  
  1843. @pytest.mark.credentials
  1844. def test_edit_profile_information(self, base_url, selenium, vouched_user):
  1845. home_page = Home(base_url, selenium)
  1846. > home_page.login(vouched_user['email'], vouched_user['password'])
  1847.  
  1848. tests/test_profile.py:40:
  1849. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1850. pages/base.py:56: in login
  1851. pop_up.sign_in(email, password)
  1852. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  1853. sign_in.sign_in(email, password)
  1854. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  1855. self.click_next(expect='password')
  1856. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  1857. *self._checking_email_provider_loading_locator)
  1858. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  1859. 'value': value})['value']
  1860. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  1861. self.error_handler.check_response(response)
  1862. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  1863.  
  1864. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d19195a50>
  1865. 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}]}}'}
  1866.  
  1867. def check_response(self, response):
  1868. """
  1869. Checks that a JSON response from the WebDriver does not have an error.
  1870.  
  1871. :Args:
  1872. - response - The JSON response from the WebDriver server as a dictionary
  1873. object.
  1874.  
  1875. :Raises: If the response contains an error message.
  1876. """
  1877. status = response.get('status', None)
  1878. if status is None or status == ErrorCode.SUCCESS:
  1879. return
  1880.  
  1881. value = None
  1882. message = response.get("message", "")
  1883. screen = response.get("screen", "")
  1884. stacktrace = None
  1885. if isinstance(status, int):
  1886. value_json = response.get('value', None)
  1887. if value_json and isinstance(value_json, basestring):
  1888. import json
  1889. try:
  1890. value = json.loads(value_json)
  1891. status = value.get('error', None)
  1892. if status is None:
  1893. status = value["status"]
  1894. message = value["value"]
  1895. if not isinstance(message, basestring):
  1896. value = message
  1897. try:
  1898. message = message['message']
  1899. except TypeError:
  1900. message = None
  1901. else:
  1902. message = value.get('message', None)
  1903. except ValueError:
  1904. pass
  1905.  
  1906. exception_class = ErrorInResponseException
  1907. if status in ErrorCode.NO_SUCH_ELEMENT:
  1908. exception_class = NoSuchElementException
  1909. elif status in ErrorCode.NO_SUCH_FRAME:
  1910. exception_class = NoSuchFrameException
  1911. elif status in ErrorCode.NO_SUCH_WINDOW:
  1912. exception_class = NoSuchWindowException
  1913. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  1914. exception_class = StaleElementReferenceException
  1915. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  1916. exception_class = ElementNotVisibleException
  1917. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  1918. exception_class = InvalidElementStateException
  1919. elif status in ErrorCode.INVALID_SELECTOR \
  1920. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  1921. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  1922. exception_class = InvalidSelectorException
  1923. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  1924. exception_class = ElementNotSelectableException
  1925. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  1926. exception_class = WebDriverException
  1927. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  1928. exception_class = WebDriverException
  1929. elif status in ErrorCode.TIMEOUT:
  1930. exception_class = TimeoutException
  1931. elif status in ErrorCode.SCRIPT_TIMEOUT:
  1932. exception_class = TimeoutException
  1933. elif status in ErrorCode.UNKNOWN_ERROR:
  1934. exception_class = WebDriverException
  1935. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  1936. exception_class = UnexpectedAlertPresentException
  1937. elif status in ErrorCode.NO_ALERT_OPEN:
  1938. exception_class = NoAlertPresentException
  1939. elif status in ErrorCode.IME_NOT_AVAILABLE:
  1940. exception_class = ImeNotAvailableException
  1941. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  1942. exception_class = ImeActivationFailedException
  1943. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  1944. exception_class = MoveTargetOutOfBoundsException
  1945. else:
  1946. exception_class = WebDriverException
  1947. if value == '' or value is None:
  1948. value = response['value']
  1949. if isinstance(value, basestring):
  1950. if exception_class == ErrorInResponseException:
  1951. raise exception_class(response, value)
  1952. raise exception_class(value)
  1953. if message == "" and 'message' in value:
  1954. message = value['message']
  1955.  
  1956. screen = None
  1957. if 'screen' in value:
  1958. screen = value['screen']
  1959.  
  1960. stacktrace = None
  1961. if 'stackTrace' in value and value['stackTrace']:
  1962. stacktrace = []
  1963. try:
  1964. for frame in value['stackTrace']:
  1965. line = self._value_or_default(frame, 'lineNumber', '')
  1966. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  1967. if line:
  1968. file = "%s:%s" % (file, line)
  1969. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  1970. if 'className' in frame:
  1971. meth = "%s.%s" % (frame['className'], meth)
  1972. msg = " at %s (%s)"
  1973. msg = msg % (meth, file)
  1974. stacktrace.append(msg)
  1975. except TypeError:
  1976. pass
  1977. if exception_class == ErrorInResponseException:
  1978. raise exception_class(response, message)
  1979. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  1980. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  1981. > raise exception_class(message, screen, stacktrace)
  1982. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  1983. E Stacktrace:
  1984. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpwnrmVy/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  1985. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpwnrmVy/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  1986.  
  1987. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  1988. ------------------------------- pytest-selenium --------------------------------
  1989. 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
  1990. _______________________ TestProfile.test_skill_deletion ________________________
  1991. [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  1992. self = <tests.test_profile.TestProfile instance at 0x7f254c5dc3f8>
  1993. base_url = 'https://mozillians.allizom.org'
  1994. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="8d5deea2-b4cb-4bdc-9af9-556ec9bb264c")>
  1995. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  1996.  
  1997. @pytest.mark.credentials
  1998. def test_skill_deletion(self, base_url, selenium, vouched_user):
  1999. home_page = Home(base_url, selenium)
  2000. > home_page.login(vouched_user['email'], vouched_user['password'])
  2001.  
  2002. tests/test_profile.py:80:
  2003. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2004. pages/base.py:56: in login
  2005. pop_up.sign_in(email, password)
  2006. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  2007. sign_in.sign_in(email, password)
  2008. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  2009. self.click_next(expect='password')
  2010. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  2011. *self._checking_email_provider_loading_locator)
  2012. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  2013. 'value': value})['value']
  2014. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  2015. self.error_handler.check_response(response)
  2016. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2017.  
  2018. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254c668350>
  2019. 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}]}}'}
  2020.  
  2021. def check_response(self, response):
  2022. """
  2023. Checks that a JSON response from the WebDriver does not have an error.
  2024.  
  2025. :Args:
  2026. - response - The JSON response from the WebDriver server as a dictionary
  2027. object.
  2028.  
  2029. :Raises: If the response contains an error message.
  2030. """
  2031. status = response.get('status', None)
  2032. if status is None or status == ErrorCode.SUCCESS:
  2033. return
  2034.  
  2035. value = None
  2036. message = response.get("message", "")
  2037. screen = response.get("screen", "")
  2038. stacktrace = None
  2039. if isinstance(status, int):
  2040. value_json = response.get('value', None)
  2041. if value_json and isinstance(value_json, basestring):
  2042. import json
  2043. try:
  2044. value = json.loads(value_json)
  2045. status = value.get('error', None)
  2046. if status is None:
  2047. status = value["status"]
  2048. message = value["value"]
  2049. if not isinstance(message, basestring):
  2050. value = message
  2051. try:
  2052. message = message['message']
  2053. except TypeError:
  2054. message = None
  2055. else:
  2056. message = value.get('message', None)
  2057. except ValueError:
  2058. pass
  2059.  
  2060. exception_class = ErrorInResponseException
  2061. if status in ErrorCode.NO_SUCH_ELEMENT:
  2062. exception_class = NoSuchElementException
  2063. elif status in ErrorCode.NO_SUCH_FRAME:
  2064. exception_class = NoSuchFrameException
  2065. elif status in ErrorCode.NO_SUCH_WINDOW:
  2066. exception_class = NoSuchWindowException
  2067. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  2068. exception_class = StaleElementReferenceException
  2069. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  2070. exception_class = ElementNotVisibleException
  2071. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  2072. exception_class = InvalidElementStateException
  2073. elif status in ErrorCode.INVALID_SELECTOR \
  2074. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  2075. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  2076. exception_class = InvalidSelectorException
  2077. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  2078. exception_class = ElementNotSelectableException
  2079. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  2080. exception_class = WebDriverException
  2081. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  2082. exception_class = WebDriverException
  2083. elif status in ErrorCode.TIMEOUT:
  2084. exception_class = TimeoutException
  2085. elif status in ErrorCode.SCRIPT_TIMEOUT:
  2086. exception_class = TimeoutException
  2087. elif status in ErrorCode.UNKNOWN_ERROR:
  2088. exception_class = WebDriverException
  2089. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  2090. exception_class = UnexpectedAlertPresentException
  2091. elif status in ErrorCode.NO_ALERT_OPEN:
  2092. exception_class = NoAlertPresentException
  2093. elif status in ErrorCode.IME_NOT_AVAILABLE:
  2094. exception_class = ImeNotAvailableException
  2095. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  2096. exception_class = ImeActivationFailedException
  2097. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  2098. exception_class = MoveTargetOutOfBoundsException
  2099. else:
  2100. exception_class = WebDriverException
  2101. if value == '' or value is None:
  2102. value = response['value']
  2103. if isinstance(value, basestring):
  2104. if exception_class == ErrorInResponseException:
  2105. raise exception_class(response, value)
  2106. raise exception_class(value)
  2107. if message == "" and 'message' in value:
  2108. message = value['message']
  2109.  
  2110. screen = None
  2111. if 'screen' in value:
  2112. screen = value['screen']
  2113.  
  2114. stacktrace = None
  2115. if 'stackTrace' in value and value['stackTrace']:
  2116. stacktrace = []
  2117. try:
  2118. for frame in value['stackTrace']:
  2119. line = self._value_or_default(frame, 'lineNumber', '')
  2120. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  2121. if line:
  2122. file = "%s:%s" % (file, line)
  2123. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  2124. if 'className' in frame:
  2125. meth = "%s.%s" % (frame['className'], meth)
  2126. msg = " at %s (%s)"
  2127. msg = msg % (meth, file)
  2128. stacktrace.append(msg)
  2129. except TypeError:
  2130. pass
  2131. if exception_class == ErrorInResponseException:
  2132. raise exception_class(response, message)
  2133. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  2134. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  2135. > raise exception_class(message, screen, stacktrace)
  2136. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  2137. E Stacktrace:
  2138. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpY2lj7_/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  2139. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpY2lj7_/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  2140.  
  2141. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  2142. ------------------------------- pytest-selenium --------------------------------
  2143. 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
  2144. _________________ TestProfile.test_that_filter_by_region_works _________________
  2145. [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  2146. self = <tests.test_profile.TestProfile instance at 0x7fea9ad98710>
  2147. base_url = 'https://mozillians.allizom.org'
  2148. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="dae79a63-3f50-48c4-b696-d8e180ead524")>
  2149. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  2150.  
  2151. @pytest.mark.credentials
  2152. @pytest.mark.nondestructive
  2153. def test_that_filter_by_region_works(self, base_url, selenium, vouched_user):
  2154. home_page = Home(base_url, selenium)
  2155. > home_page.login(vouched_user['email'], vouched_user['password'])
  2156.  
  2157. tests/test_profile.py:124:
  2158. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2159. pages/base.py:56: in login
  2160. pop_up.sign_in(email, password)
  2161. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  2162. sign_in.sign_in(email, password)
  2163. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  2164. self.click_next(expect='password')
  2165. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  2166. *self._checking_email_provider_loading_locator)
  2167. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  2168. 'value': value})['value']
  2169. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  2170. self.error_handler.check_response(response)
  2171. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2172.  
  2173. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea9a046350>
  2174. 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}]}}'}
  2175.  
  2176. def check_response(self, response):
  2177. """
  2178. Checks that a JSON response from the WebDriver does not have an error.
  2179.  
  2180. :Args:
  2181. - response - The JSON response from the WebDriver server as a dictionary
  2182. object.
  2183.  
  2184. :Raises: If the response contains an error message.
  2185. """
  2186. status = response.get('status', None)
  2187. if status is None or status == ErrorCode.SUCCESS:
  2188. return
  2189.  
  2190. value = None
  2191. message = response.get("message", "")
  2192. screen = response.get("screen", "")
  2193. stacktrace = None
  2194. if isinstance(status, int):
  2195. value_json = response.get('value', None)
  2196. if value_json and isinstance(value_json, basestring):
  2197. import json
  2198. try:
  2199. value = json.loads(value_json)
  2200. status = value.get('error', None)
  2201. if status is None:
  2202. status = value["status"]
  2203. message = value["value"]
  2204. if not isinstance(message, basestring):
  2205. value = message
  2206. try:
  2207. message = message['message']
  2208. except TypeError:
  2209. message = None
  2210. else:
  2211. message = value.get('message', None)
  2212. except ValueError:
  2213. pass
  2214.  
  2215. exception_class = ErrorInResponseException
  2216. if status in ErrorCode.NO_SUCH_ELEMENT:
  2217. exception_class = NoSuchElementException
  2218. elif status in ErrorCode.NO_SUCH_FRAME:
  2219. exception_class = NoSuchFrameException
  2220. elif status in ErrorCode.NO_SUCH_WINDOW:
  2221. exception_class = NoSuchWindowException
  2222. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  2223. exception_class = StaleElementReferenceException
  2224. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  2225. exception_class = ElementNotVisibleException
  2226. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  2227. exception_class = InvalidElementStateException
  2228. elif status in ErrorCode.INVALID_SELECTOR \
  2229. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  2230. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  2231. exception_class = InvalidSelectorException
  2232. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  2233. exception_class = ElementNotSelectableException
  2234. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  2235. exception_class = WebDriverException
  2236. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  2237. exception_class = WebDriverException
  2238. elif status in ErrorCode.TIMEOUT:
  2239. exception_class = TimeoutException
  2240. elif status in ErrorCode.SCRIPT_TIMEOUT:
  2241. exception_class = TimeoutException
  2242. elif status in ErrorCode.UNKNOWN_ERROR:
  2243. exception_class = WebDriverException
  2244. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  2245. exception_class = UnexpectedAlertPresentException
  2246. elif status in ErrorCode.NO_ALERT_OPEN:
  2247. exception_class = NoAlertPresentException
  2248. elif status in ErrorCode.IME_NOT_AVAILABLE:
  2249. exception_class = ImeNotAvailableException
  2250. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  2251. exception_class = ImeActivationFailedException
  2252. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  2253. exception_class = MoveTargetOutOfBoundsException
  2254. else:
  2255. exception_class = WebDriverException
  2256. if value == '' or value is None:
  2257. value = response['value']
  2258. if isinstance(value, basestring):
  2259. if exception_class == ErrorInResponseException:
  2260. raise exception_class(response, value)
  2261. raise exception_class(value)
  2262. if message == "" and 'message' in value:
  2263. message = value['message']
  2264.  
  2265. screen = None
  2266. if 'screen' in value:
  2267. screen = value['screen']
  2268.  
  2269. stacktrace = None
  2270. if 'stackTrace' in value and value['stackTrace']:
  2271. stacktrace = []
  2272. try:
  2273. for frame in value['stackTrace']:
  2274. line = self._value_or_default(frame, 'lineNumber', '')
  2275. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  2276. if line:
  2277. file = "%s:%s" % (file, line)
  2278. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  2279. if 'className' in frame:
  2280. meth = "%s.%s" % (frame['className'], meth)
  2281. msg = " at %s (%s)"
  2282. msg = msg % (meth, file)
  2283. stacktrace.append(msg)
  2284. except TypeError:
  2285. pass
  2286. if exception_class == ErrorInResponseException:
  2287. raise exception_class(response, message)
  2288. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  2289. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  2290. > raise exception_class(message, screen, stacktrace)
  2291. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  2292. E Stacktrace:
  2293. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmp7uyDGN/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  2294. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmp7uyDGN/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  2295.  
  2296. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  2297. ------------------------------- pytest-selenium --------------------------------
  2298. 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
  2299. ________________ TestProfile.test_that_filter_by_country_works _________________
  2300. [gw3] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  2301. self = <tests.test_profile.TestProfile instance at 0x7f36346d6518>
  2302. base_url = 'https://mozillians.allizom.org'
  2303. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="2114c3f9-755e-4248-8a88-a35ecdba5877")>
  2304. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  2305.  
  2306. @pytest.mark.credentials
  2307. @pytest.mark.nondestructive
  2308. def test_that_filter_by_country_works(self, base_url, selenium, vouched_user):
  2309. home_page = Home(base_url, selenium)
  2310. > home_page.login(vouched_user['email'], vouched_user['password'])
  2311.  
  2312. tests/test_profile.py:142:
  2313. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2314. pages/base.py:56: in login
  2315. pop_up.sign_in(email, password)
  2316. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  2317. sign_in.sign_in(email, password)
  2318. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  2319. self.click_next(expect='password')
  2320. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  2321. *self._checking_email_provider_loading_locator)
  2322. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  2323. 'value': value})['value']
  2324. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  2325. self.error_handler.check_response(response)
  2326. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2327.  
  2328. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f3634685290>
  2329. 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}]}}'}
  2330.  
  2331. def check_response(self, response):
  2332. """
  2333. Checks that a JSON response from the WebDriver does not have an error.
  2334.  
  2335. :Args:
  2336. - response - The JSON response from the WebDriver server as a dictionary
  2337. object.
  2338.  
  2339. :Raises: If the response contains an error message.
  2340. """
  2341. status = response.get('status', None)
  2342. if status is None or status == ErrorCode.SUCCESS:
  2343. return
  2344.  
  2345. value = None
  2346. message = response.get("message", "")
  2347. screen = response.get("screen", "")
  2348. stacktrace = None
  2349. if isinstance(status, int):
  2350. value_json = response.get('value', None)
  2351. if value_json and isinstance(value_json, basestring):
  2352. import json
  2353. try:
  2354. value = json.loads(value_json)
  2355. status = value.get('error', None)
  2356. if status is None:
  2357. status = value["status"]
  2358. message = value["value"]
  2359. if not isinstance(message, basestring):
  2360. value = message
  2361. try:
  2362. message = message['message']
  2363. except TypeError:
  2364. message = None
  2365. else:
  2366. message = value.get('message', None)
  2367. except ValueError:
  2368. pass
  2369.  
  2370. exception_class = ErrorInResponseException
  2371. if status in ErrorCode.NO_SUCH_ELEMENT:
  2372. exception_class = NoSuchElementException
  2373. elif status in ErrorCode.NO_SUCH_FRAME:
  2374. exception_class = NoSuchFrameException
  2375. elif status in ErrorCode.NO_SUCH_WINDOW:
  2376. exception_class = NoSuchWindowException
  2377. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  2378. exception_class = StaleElementReferenceException
  2379. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  2380. exception_class = ElementNotVisibleException
  2381. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  2382. exception_class = InvalidElementStateException
  2383. elif status in ErrorCode.INVALID_SELECTOR \
  2384. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  2385. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  2386. exception_class = InvalidSelectorException
  2387. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  2388. exception_class = ElementNotSelectableException
  2389. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  2390. exception_class = WebDriverException
  2391. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  2392. exception_class = WebDriverException
  2393. elif status in ErrorCode.TIMEOUT:
  2394. exception_class = TimeoutException
  2395. elif status in ErrorCode.SCRIPT_TIMEOUT:
  2396. exception_class = TimeoutException
  2397. elif status in ErrorCode.UNKNOWN_ERROR:
  2398. exception_class = WebDriverException
  2399. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  2400. exception_class = UnexpectedAlertPresentException
  2401. elif status in ErrorCode.NO_ALERT_OPEN:
  2402. exception_class = NoAlertPresentException
  2403. elif status in ErrorCode.IME_NOT_AVAILABLE:
  2404. exception_class = ImeNotAvailableException
  2405. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  2406. exception_class = ImeActivationFailedException
  2407. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  2408. exception_class = MoveTargetOutOfBoundsException
  2409. else:
  2410. exception_class = WebDriverException
  2411. if value == '' or value is None:
  2412. value = response['value']
  2413. if isinstance(value, basestring):
  2414. if exception_class == ErrorInResponseException:
  2415. raise exception_class(response, value)
  2416. raise exception_class(value)
  2417. if message == "" and 'message' in value:
  2418. message = value['message']
  2419.  
  2420. screen = None
  2421. if 'screen' in value:
  2422. screen = value['screen']
  2423.  
  2424. stacktrace = None
  2425. if 'stackTrace' in value and value['stackTrace']:
  2426. stacktrace = []
  2427. try:
  2428. for frame in value['stackTrace']:
  2429. line = self._value_or_default(frame, 'lineNumber', '')
  2430. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  2431. if line:
  2432. file = "%s:%s" % (file, line)
  2433. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  2434. if 'className' in frame:
  2435. meth = "%s.%s" % (frame['className'], meth)
  2436. msg = " at %s (%s)"
  2437. msg = msg % (meth, file)
  2438. stacktrace.append(msg)
  2439. except TypeError:
  2440. pass
  2441. if exception_class == ErrorInResponseException:
  2442. raise exception_class(response, message)
  2443. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  2444. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  2445. > raise exception_class(message, screen, stacktrace)
  2446. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  2447. E Stacktrace:
  2448. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpEr7Owl/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  2449. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpEr7Owl/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  2450.  
  2451. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  2452. ------------------------------- pytest-selenium --------------------------------
  2453. 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
  2454. _________ TestProfile.test_that_non_us_user_can_set_get_involved_date __________
  2455. [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  2456. self = <tests.test_profile.TestProfile instance at 0x7f5d19f5a320>
  2457. base_url = 'https://mozillians.allizom.org'
  2458. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="d4f1bfa3-e24a-4fc6-9463-71fe879e5d98")>
  2459. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  2460.  
  2461. @pytest.mark.credentials
  2462. def test_that_non_us_user_can_set_get_involved_date(self, base_url, selenium, vouched_user):
  2463. home_page = Home(base_url, selenium)
  2464. > home_page.login(vouched_user['email'], vouched_user['password'])
  2465.  
  2466. tests/test_profile.py:158:
  2467. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2468. pages/base.py:56: in login
  2469. pop_up.sign_in(email, password)
  2470. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  2471. sign_in.sign_in(email, password)
  2472. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  2473. self.click_next(expect='password')
  2474. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  2475. *self._checking_email_provider_loading_locator)
  2476. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  2477. 'value': value})['value']
  2478. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  2479. self.error_handler.check_response(response)
  2480. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2481.  
  2482. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d19201990>
  2483. 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}]}}'}
  2484.  
  2485. def check_response(self, response):
  2486. """
  2487. Checks that a JSON response from the WebDriver does not have an error.
  2488.  
  2489. :Args:
  2490. - response - The JSON response from the WebDriver server as a dictionary
  2491. object.
  2492.  
  2493. :Raises: If the response contains an error message.
  2494. """
  2495. status = response.get('status', None)
  2496. if status is None or status == ErrorCode.SUCCESS:
  2497. return
  2498.  
  2499. value = None
  2500. message = response.get("message", "")
  2501. screen = response.get("screen", "")
  2502. stacktrace = None
  2503. if isinstance(status, int):
  2504. value_json = response.get('value', None)
  2505. if value_json and isinstance(value_json, basestring):
  2506. import json
  2507. try:
  2508. value = json.loads(value_json)
  2509. status = value.get('error', None)
  2510. if status is None:
  2511. status = value["status"]
  2512. message = value["value"]
  2513. if not isinstance(message, basestring):
  2514. value = message
  2515. try:
  2516. message = message['message']
  2517. except TypeError:
  2518. message = None
  2519. else:
  2520. message = value.get('message', None)
  2521. except ValueError:
  2522. pass
  2523.  
  2524. exception_class = ErrorInResponseException
  2525. if status in ErrorCode.NO_SUCH_ELEMENT:
  2526. exception_class = NoSuchElementException
  2527. elif status in ErrorCode.NO_SUCH_FRAME:
  2528. exception_class = NoSuchFrameException
  2529. elif status in ErrorCode.NO_SUCH_WINDOW:
  2530. exception_class = NoSuchWindowException
  2531. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  2532. exception_class = StaleElementReferenceException
  2533. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  2534. exception_class = ElementNotVisibleException
  2535. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  2536. exception_class = InvalidElementStateException
  2537. elif status in ErrorCode.INVALID_SELECTOR \
  2538. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  2539. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  2540. exception_class = InvalidSelectorException
  2541. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  2542. exception_class = ElementNotSelectableException
  2543. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  2544. exception_class = WebDriverException
  2545. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  2546. exception_class = WebDriverException
  2547. elif status in ErrorCode.TIMEOUT:
  2548. exception_class = TimeoutException
  2549. elif status in ErrorCode.SCRIPT_TIMEOUT:
  2550. exception_class = TimeoutException
  2551. elif status in ErrorCode.UNKNOWN_ERROR:
  2552. exception_class = WebDriverException
  2553. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  2554. exception_class = UnexpectedAlertPresentException
  2555. elif status in ErrorCode.NO_ALERT_OPEN:
  2556. exception_class = NoAlertPresentException
  2557. elif status in ErrorCode.IME_NOT_AVAILABLE:
  2558. exception_class = ImeNotAvailableException
  2559. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  2560. exception_class = ImeActivationFailedException
  2561. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  2562. exception_class = MoveTargetOutOfBoundsException
  2563. else:
  2564. exception_class = WebDriverException
  2565. if value == '' or value is None:
  2566. value = response['value']
  2567. if isinstance(value, basestring):
  2568. if exception_class == ErrorInResponseException:
  2569. raise exception_class(response, value)
  2570. raise exception_class(value)
  2571. if message == "" and 'message' in value:
  2572. message = value['message']
  2573.  
  2574. screen = None
  2575. if 'screen' in value:
  2576. screen = value['screen']
  2577.  
  2578. stacktrace = None
  2579. if 'stackTrace' in value and value['stackTrace']:
  2580. stacktrace = []
  2581. try:
  2582. for frame in value['stackTrace']:
  2583. line = self._value_or_default(frame, 'lineNumber', '')
  2584. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  2585. if line:
  2586. file = "%s:%s" % (file, line)
  2587. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  2588. if 'className' in frame:
  2589. meth = "%s.%s" % (frame['className'], meth)
  2590. msg = " at %s (%s)"
  2591. msg = msg % (meth, file)
  2592. stacktrace.append(msg)
  2593. except TypeError:
  2594. pass
  2595. if exception_class == ErrorInResponseException:
  2596. raise exception_class(response, message)
  2597. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  2598. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  2599. > raise exception_class(message, screen, stacktrace)
  2600. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  2601. E Stacktrace:
  2602. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmp4j2BZl/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  2603. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmp4j2BZl/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  2604.  
  2605. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  2606. ------------------------------- pytest-selenium --------------------------------
  2607. 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
  2608. ____________ TestProfile.test_that_user_can_create_and_delete_group ____________
  2609. [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  2610. self = <tests.test_profile.TestProfile instance at 0x7f254c65f758>
  2611. base_url = 'https://mozillians.allizom.org'
  2612. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="891c1013-7df8-44e0-bcae-794db450720f")>
  2613. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  2614.  
  2615. @pytest.mark.credentials
  2616. def test_that_user_can_create_and_delete_group(self, base_url, selenium, vouched_user):
  2617. group_name = (time.strftime('%x-%X'))
  2618.  
  2619. home_page = Home(base_url, selenium)
  2620. > home_page.login(vouched_user['email'], vouched_user['password'])
  2621.  
  2622. tests/test_profile.py:179:
  2623. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2624. pages/base.py:56: in login
  2625. pop_up.sign_in(email, password)
  2626. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  2627. sign_in.sign_in(email, password)
  2628. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  2629. self.click_next(expect='password')
  2630. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  2631. *self._checking_email_provider_loading_locator)
  2632. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  2633. 'value': value})['value']
  2634. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  2635. self.error_handler.check_response(response)
  2636. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2637.  
  2638. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254c58d5d0>
  2639. 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}]}}'}
  2640.  
  2641. def check_response(self, response):
  2642. """
  2643. Checks that a JSON response from the WebDriver does not have an error.
  2644.  
  2645. :Args:
  2646. - response - The JSON response from the WebDriver server as a dictionary
  2647. object.
  2648.  
  2649. :Raises: If the response contains an error message.
  2650. """
  2651. status = response.get('status', None)
  2652. if status is None or status == ErrorCode.SUCCESS:
  2653. return
  2654.  
  2655. value = None
  2656. message = response.get("message", "")
  2657. screen = response.get("screen", "")
  2658. stacktrace = None
  2659. if isinstance(status, int):
  2660. value_json = response.get('value', None)
  2661. if value_json and isinstance(value_json, basestring):
  2662. import json
  2663. try:
  2664. value = json.loads(value_json)
  2665. status = value.get('error', None)
  2666. if status is None:
  2667. status = value["status"]
  2668. message = value["value"]
  2669. if not isinstance(message, basestring):
  2670. value = message
  2671. try:
  2672. message = message['message']
  2673. except TypeError:
  2674. message = None
  2675. else:
  2676. message = value.get('message', None)
  2677. except ValueError:
  2678. pass
  2679.  
  2680. exception_class = ErrorInResponseException
  2681. if status in ErrorCode.NO_SUCH_ELEMENT:
  2682. exception_class = NoSuchElementException
  2683. elif status in ErrorCode.NO_SUCH_FRAME:
  2684. exception_class = NoSuchFrameException
  2685. elif status in ErrorCode.NO_SUCH_WINDOW:
  2686. exception_class = NoSuchWindowException
  2687. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  2688. exception_class = StaleElementReferenceException
  2689. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  2690. exception_class = ElementNotVisibleException
  2691. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  2692. exception_class = InvalidElementStateException
  2693. elif status in ErrorCode.INVALID_SELECTOR \
  2694. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  2695. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  2696. exception_class = InvalidSelectorException
  2697. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  2698. exception_class = ElementNotSelectableException
  2699. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  2700. exception_class = WebDriverException
  2701. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  2702. exception_class = WebDriverException
  2703. elif status in ErrorCode.TIMEOUT:
  2704. exception_class = TimeoutException
  2705. elif status in ErrorCode.SCRIPT_TIMEOUT:
  2706. exception_class = TimeoutException
  2707. elif status in ErrorCode.UNKNOWN_ERROR:
  2708. exception_class = WebDriverException
  2709. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  2710. exception_class = UnexpectedAlertPresentException
  2711. elif status in ErrorCode.NO_ALERT_OPEN:
  2712. exception_class = NoAlertPresentException
  2713. elif status in ErrorCode.IME_NOT_AVAILABLE:
  2714. exception_class = ImeNotAvailableException
  2715. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  2716. exception_class = ImeActivationFailedException
  2717. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  2718. exception_class = MoveTargetOutOfBoundsException
  2719. else:
  2720. exception_class = WebDriverException
  2721. if value == '' or value is None:
  2722. value = response['value']
  2723. if isinstance(value, basestring):
  2724. if exception_class == ErrorInResponseException:
  2725. raise exception_class(response, value)
  2726. raise exception_class(value)
  2727. if message == "" and 'message' in value:
  2728. message = value['message']
  2729.  
  2730. screen = None
  2731. if 'screen' in value:
  2732. screen = value['screen']
  2733.  
  2734. stacktrace = None
  2735. if 'stackTrace' in value and value['stackTrace']:
  2736. stacktrace = []
  2737. try:
  2738. for frame in value['stackTrace']:
  2739. line = self._value_or_default(frame, 'lineNumber', '')
  2740. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  2741. if line:
  2742. file = "%s:%s" % (file, line)
  2743. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  2744. if 'className' in frame:
  2745. meth = "%s.%s" % (frame['className'], meth)
  2746. msg = " at %s (%s)"
  2747. msg = msg % (meth, file)
  2748. stacktrace.append(msg)
  2749. except TypeError:
  2750. pass
  2751. if exception_class == ErrorInResponseException:
  2752. raise exception_class(response, message)
  2753. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  2754. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  2755. > raise exception_class(message, screen, stacktrace)
  2756. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  2757. E Stacktrace:
  2758. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmp4YTyUC/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  2759. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmp4YTyUC/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  2760.  
  2761. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  2762. ------------------------------- pytest-selenium --------------------------------
  2763. 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
  2764. ________ TestProfile.test_private_groups_field_as_public_when_logged_in ________
  2765. [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  2766. self = <tests.test_profile.TestProfile instance at 0x7fea9adb5098>
  2767. base_url = 'https://mozillians.allizom.org'
  2768. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="795cdfa8-6214-4e10-99b0-8c7e1db3a8bc")>
  2769. private_user = {'email': 'teovermesantest2@gmail.com', 'name': 'teo test2', 'password': 'mozillatest'}
  2770.  
  2771. @pytest.mark.credentials
  2772. @pytest.mark.nondestructive
  2773. def test_private_groups_field_as_public_when_logged_in(self, base_url, selenium, private_user):
  2774. # User has certain fields preset to values to run the test properly
  2775. # groups - private
  2776. # belongs to at least one group
  2777. home_page = Home(base_url, selenium)
  2778. > home_page.login(private_user['email'], private_user['password'])
  2779.  
  2780. tests/test_profile.py:205:
  2781. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2782. pages/base.py:56: in login
  2783. pop_up.sign_in(email, password)
  2784. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  2785. sign_in.sign_in(email, password)
  2786. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  2787. self.click_next(expect='password')
  2788. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  2789. *self._checking_email_provider_loading_locator)
  2790. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  2791. 'value': value})['value']
  2792. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  2793. self.error_handler.check_response(response)
  2794. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2795.  
  2796. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea99f6a4d0>
  2797. 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}]}}'}
  2798.  
  2799. def check_response(self, response):
  2800. """
  2801. Checks that a JSON response from the WebDriver does not have an error.
  2802.  
  2803. :Args:
  2804. - response - The JSON response from the WebDriver server as a dictionary
  2805. object.
  2806.  
  2807. :Raises: If the response contains an error message.
  2808. """
  2809. status = response.get('status', None)
  2810. if status is None or status == ErrorCode.SUCCESS:
  2811. return
  2812.  
  2813. value = None
  2814. message = response.get("message", "")
  2815. screen = response.get("screen", "")
  2816. stacktrace = None
  2817. if isinstance(status, int):
  2818. value_json = response.get('value', None)
  2819. if value_json and isinstance(value_json, basestring):
  2820. import json
  2821. try:
  2822. value = json.loads(value_json)
  2823. status = value.get('error', None)
  2824. if status is None:
  2825. status = value["status"]
  2826. message = value["value"]
  2827. if not isinstance(message, basestring):
  2828. value = message
  2829. try:
  2830. message = message['message']
  2831. except TypeError:
  2832. message = None
  2833. else:
  2834. message = value.get('message', None)
  2835. except ValueError:
  2836. pass
  2837.  
  2838. exception_class = ErrorInResponseException
  2839. if status in ErrorCode.NO_SUCH_ELEMENT:
  2840. exception_class = NoSuchElementException
  2841. elif status in ErrorCode.NO_SUCH_FRAME:
  2842. exception_class = NoSuchFrameException
  2843. elif status in ErrorCode.NO_SUCH_WINDOW:
  2844. exception_class = NoSuchWindowException
  2845. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  2846. exception_class = StaleElementReferenceException
  2847. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  2848. exception_class = ElementNotVisibleException
  2849. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  2850. exception_class = InvalidElementStateException
  2851. elif status in ErrorCode.INVALID_SELECTOR \
  2852. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  2853. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  2854. exception_class = InvalidSelectorException
  2855. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  2856. exception_class = ElementNotSelectableException
  2857. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  2858. exception_class = WebDriverException
  2859. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  2860. exception_class = WebDriverException
  2861. elif status in ErrorCode.TIMEOUT:
  2862. exception_class = TimeoutException
  2863. elif status in ErrorCode.SCRIPT_TIMEOUT:
  2864. exception_class = TimeoutException
  2865. elif status in ErrorCode.UNKNOWN_ERROR:
  2866. exception_class = WebDriverException
  2867. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  2868. exception_class = UnexpectedAlertPresentException
  2869. elif status in ErrorCode.NO_ALERT_OPEN:
  2870. exception_class = NoAlertPresentException
  2871. elif status in ErrorCode.IME_NOT_AVAILABLE:
  2872. exception_class = ImeNotAvailableException
  2873. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  2874. exception_class = ImeActivationFailedException
  2875. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  2876. exception_class = MoveTargetOutOfBoundsException
  2877. else:
  2878. exception_class = WebDriverException
  2879. if value == '' or value is None:
  2880. value = response['value']
  2881. if isinstance(value, basestring):
  2882. if exception_class == ErrorInResponseException:
  2883. raise exception_class(response, value)
  2884. raise exception_class(value)
  2885. if message == "" and 'message' in value:
  2886. message = value['message']
  2887.  
  2888. screen = None
  2889. if 'screen' in value:
  2890. screen = value['screen']
  2891.  
  2892. stacktrace = None
  2893. if 'stackTrace' in value and value['stackTrace']:
  2894. stacktrace = []
  2895. try:
  2896. for frame in value['stackTrace']:
  2897. line = self._value_or_default(frame, 'lineNumber', '')
  2898. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  2899. if line:
  2900. file = "%s:%s" % (file, line)
  2901. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  2902. if 'className' in frame:
  2903. meth = "%s.%s" % (frame['className'], meth)
  2904. msg = " at %s (%s)"
  2905. msg = msg % (meth, file)
  2906. stacktrace.append(msg)
  2907. except TypeError:
  2908. pass
  2909. if exception_class == ErrorInResponseException:
  2910. raise exception_class(response, message)
  2911. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  2912. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  2913. > raise exception_class(message, screen, stacktrace)
  2914. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  2915. E Stacktrace:
  2916. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpaLqUg8/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  2917. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpaLqUg8/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  2918.  
  2919. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  2920. ------------------------------- pytest-selenium --------------------------------
  2921. 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
  2922. _______ TestProfile.test_that_links_in_the_services_page_return_200_code _______
  2923. [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  2924. self = <tests.test_profile.TestProfile instance at 0x7f5d1909b488>
  2925. base_url = 'https://mozillians.allizom.org'
  2926. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="716c6b77-90c1-4c15-9705-731aeed20949")>
  2927. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  2928.  
  2929. @pytest.mark.credentials
  2930. @pytest.mark.nondestructive
  2931. def test_that_links_in_the_services_page_return_200_code(self, base_url, selenium, vouched_user):
  2932. home_page = Home(base_url, selenium)
  2933. > home_page.login(vouched_user['email'], vouched_user['password'])
  2934.  
  2935. tests/test_profile.py:222:
  2936. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2937. pages/base.py:56: in login
  2938. pop_up.sign_in(email, password)
  2939. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  2940. sign_in.sign_in(email, password)
  2941. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  2942. self.click_next(expect='password')
  2943. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  2944. *self._checking_email_provider_loading_locator)
  2945. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  2946. 'value': value})['value']
  2947. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  2948. self.error_handler.check_response(response)
  2949. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  2950.  
  2951. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d19163a50>
  2952. 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}]}}'}
  2953.  
  2954. def check_response(self, response):
  2955. """
  2956. Checks that a JSON response from the WebDriver does not have an error.
  2957.  
  2958. :Args:
  2959. - response - The JSON response from the WebDriver server as a dictionary
  2960. object.
  2961.  
  2962. :Raises: If the response contains an error message.
  2963. """
  2964. status = response.get('status', None)
  2965. if status is None or status == ErrorCode.SUCCESS:
  2966. return
  2967.  
  2968. value = None
  2969. message = response.get("message", "")
  2970. screen = response.get("screen", "")
  2971. stacktrace = None
  2972. if isinstance(status, int):
  2973. value_json = response.get('value', None)
  2974. if value_json and isinstance(value_json, basestring):
  2975. import json
  2976. try:
  2977. value = json.loads(value_json)
  2978. status = value.get('error', None)
  2979. if status is None:
  2980. status = value["status"]
  2981. message = value["value"]
  2982. if not isinstance(message, basestring):
  2983. value = message
  2984. try:
  2985. message = message['message']
  2986. except TypeError:
  2987. message = None
  2988. else:
  2989. message = value.get('message', None)
  2990. except ValueError:
  2991. pass
  2992.  
  2993. exception_class = ErrorInResponseException
  2994. if status in ErrorCode.NO_SUCH_ELEMENT:
  2995. exception_class = NoSuchElementException
  2996. elif status in ErrorCode.NO_SUCH_FRAME:
  2997. exception_class = NoSuchFrameException
  2998. elif status in ErrorCode.NO_SUCH_WINDOW:
  2999. exception_class = NoSuchWindowException
  3000. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  3001. exception_class = StaleElementReferenceException
  3002. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  3003. exception_class = ElementNotVisibleException
  3004. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  3005. exception_class = InvalidElementStateException
  3006. elif status in ErrorCode.INVALID_SELECTOR \
  3007. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  3008. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  3009. exception_class = InvalidSelectorException
  3010. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  3011. exception_class = ElementNotSelectableException
  3012. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  3013. exception_class = WebDriverException
  3014. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  3015. exception_class = WebDriverException
  3016. elif status in ErrorCode.TIMEOUT:
  3017. exception_class = TimeoutException
  3018. elif status in ErrorCode.SCRIPT_TIMEOUT:
  3019. exception_class = TimeoutException
  3020. elif status in ErrorCode.UNKNOWN_ERROR:
  3021. exception_class = WebDriverException
  3022. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  3023. exception_class = UnexpectedAlertPresentException
  3024. elif status in ErrorCode.NO_ALERT_OPEN:
  3025. exception_class = NoAlertPresentException
  3026. elif status in ErrorCode.IME_NOT_AVAILABLE:
  3027. exception_class = ImeNotAvailableException
  3028. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  3029. exception_class = ImeActivationFailedException
  3030. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  3031. exception_class = MoveTargetOutOfBoundsException
  3032. else:
  3033. exception_class = WebDriverException
  3034. if value == '' or value is None:
  3035. value = response['value']
  3036. if isinstance(value, basestring):
  3037. if exception_class == ErrorInResponseException:
  3038. raise exception_class(response, value)
  3039. raise exception_class(value)
  3040. if message == "" and 'message' in value:
  3041. message = value['message']
  3042.  
  3043. screen = None
  3044. if 'screen' in value:
  3045. screen = value['screen']
  3046.  
  3047. stacktrace = None
  3048. if 'stackTrace' in value and value['stackTrace']:
  3049. stacktrace = []
  3050. try:
  3051. for frame in value['stackTrace']:
  3052. line = self._value_or_default(frame, 'lineNumber', '')
  3053. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  3054. if line:
  3055. file = "%s:%s" % (file, line)
  3056. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  3057. if 'className' in frame:
  3058. meth = "%s.%s" % (frame['className'], meth)
  3059. msg = " at %s (%s)"
  3060. msg = msg % (meth, file)
  3061. stacktrace.append(msg)
  3062. except TypeError:
  3063. pass
  3064. if exception_class == ErrorInResponseException:
  3065. raise exception_class(response, message)
  3066. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  3067. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  3068. > raise exception_class(message, screen, stacktrace)
  3069. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  3070. E Stacktrace:
  3071. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpa6Gz4s/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  3072. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpa6Gz4s/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  3073.  
  3074. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  3075. ------------------------------- pytest-selenium --------------------------------
  3076. 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
  3077. ____________ TestProfile.test_that_user_can_view_external_accounts _____________
  3078. [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  3079. self = <tests.test_profile.TestProfile instance at 0x7f254c422cf8>
  3080. base_url = 'https://mozillians.allizom.org'
  3081. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="662ab1bf-3562-420e-9485-c38410e7c42d")>
  3082. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  3083.  
  3084. @pytest.mark.credentials
  3085. @pytest.mark.nondestructive
  3086. def test_that_user_can_view_external_accounts(self, base_url, selenium, vouched_user):
  3087. home_page = Home(base_url, selenium)
  3088. > home_page.login(vouched_user['email'], vouched_user['password'])
  3089.  
  3090. tests/test_profile.py:243:
  3091. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3092. pages/base.py:56: in login
  3093. pop_up.sign_in(email, password)
  3094. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  3095. sign_in.sign_in(email, password)
  3096. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  3097. self.click_next(expect='password')
  3098. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  3099. *self._checking_email_provider_loading_locator)
  3100. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  3101. 'value': value})['value']
  3102. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  3103. self.error_handler.check_response(response)
  3104. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3105.  
  3106. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254c624750>
  3107. 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}]}}'}
  3108.  
  3109. def check_response(self, response):
  3110. """
  3111. Checks that a JSON response from the WebDriver does not have an error.
  3112.  
  3113. :Args:
  3114. - response - The JSON response from the WebDriver server as a dictionary
  3115. object.
  3116.  
  3117. :Raises: If the response contains an error message.
  3118. """
  3119. status = response.get('status', None)
  3120. if status is None or status == ErrorCode.SUCCESS:
  3121. return
  3122.  
  3123. value = None
  3124. message = response.get("message", "")
  3125. screen = response.get("screen", "")
  3126. stacktrace = None
  3127. if isinstance(status, int):
  3128. value_json = response.get('value', None)
  3129. if value_json and isinstance(value_json, basestring):
  3130. import json
  3131. try:
  3132. value = json.loads(value_json)
  3133. status = value.get('error', None)
  3134. if status is None:
  3135. status = value["status"]
  3136. message = value["value"]
  3137. if not isinstance(message, basestring):
  3138. value = message
  3139. try:
  3140. message = message['message']
  3141. except TypeError:
  3142. message = None
  3143. else:
  3144. message = value.get('message', None)
  3145. except ValueError:
  3146. pass
  3147.  
  3148. exception_class = ErrorInResponseException
  3149. if status in ErrorCode.NO_SUCH_ELEMENT:
  3150. exception_class = NoSuchElementException
  3151. elif status in ErrorCode.NO_SUCH_FRAME:
  3152. exception_class = NoSuchFrameException
  3153. elif status in ErrorCode.NO_SUCH_WINDOW:
  3154. exception_class = NoSuchWindowException
  3155. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  3156. exception_class = StaleElementReferenceException
  3157. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  3158. exception_class = ElementNotVisibleException
  3159. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  3160. exception_class = InvalidElementStateException
  3161. elif status in ErrorCode.INVALID_SELECTOR \
  3162. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  3163. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  3164. exception_class = InvalidSelectorException
  3165. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  3166. exception_class = ElementNotSelectableException
  3167. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  3168. exception_class = WebDriverException
  3169. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  3170. exception_class = WebDriverException
  3171. elif status in ErrorCode.TIMEOUT:
  3172. exception_class = TimeoutException
  3173. elif status in ErrorCode.SCRIPT_TIMEOUT:
  3174. exception_class = TimeoutException
  3175. elif status in ErrorCode.UNKNOWN_ERROR:
  3176. exception_class = WebDriverException
  3177. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  3178. exception_class = UnexpectedAlertPresentException
  3179. elif status in ErrorCode.NO_ALERT_OPEN:
  3180. exception_class = NoAlertPresentException
  3181. elif status in ErrorCode.IME_NOT_AVAILABLE:
  3182. exception_class = ImeNotAvailableException
  3183. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  3184. exception_class = ImeActivationFailedException
  3185. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  3186. exception_class = MoveTargetOutOfBoundsException
  3187. else:
  3188. exception_class = WebDriverException
  3189. if value == '' or value is None:
  3190. value = response['value']
  3191. if isinstance(value, basestring):
  3192. if exception_class == ErrorInResponseException:
  3193. raise exception_class(response, value)
  3194. raise exception_class(value)
  3195. if message == "" and 'message' in value:
  3196. message = value['message']
  3197.  
  3198. screen = None
  3199. if 'screen' in value:
  3200. screen = value['screen']
  3201.  
  3202. stacktrace = None
  3203. if 'stackTrace' in value and value['stackTrace']:
  3204. stacktrace = []
  3205. try:
  3206. for frame in value['stackTrace']:
  3207. line = self._value_or_default(frame, 'lineNumber', '')
  3208. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  3209. if line:
  3210. file = "%s:%s" % (file, line)
  3211. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  3212. if 'className' in frame:
  3213. meth = "%s.%s" % (frame['className'], meth)
  3214. msg = " at %s (%s)"
  3215. msg = msg % (meth, file)
  3216. stacktrace.append(msg)
  3217. except TypeError:
  3218. pass
  3219. if exception_class == ErrorInResponseException:
  3220. raise exception_class(response, message)
  3221. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  3222. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  3223. > raise exception_class(message, screen, stacktrace)
  3224. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  3225. E Stacktrace:
  3226. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpkM4zNY/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  3227. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpkM4zNY/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  3228.  
  3229. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  3230. ------------------------------- pytest-selenium --------------------------------
  3231. 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
  3232. _____________ TestProfile.test_that_user_can_add_external_account ______________
  3233. [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  3234. self = <tests.test_profile.TestProfile instance at 0x7fea99dfd5f0>
  3235. base_url = 'https://mozillians.allizom.org'
  3236. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="38570df2-0901-428b-a5bd-4f2cd0ac13e0")>
  3237. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  3238.  
  3239. @pytest.mark.credentials
  3240. def test_that_user_can_add_external_account(self, base_url, selenium, vouched_user):
  3241. home_page = Home(base_url, selenium)
  3242. > home_page.login(vouched_user['email'], vouched_user['password'])
  3243.  
  3244. tests/test_profile.py:252:
  3245. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3246. pages/base.py:56: in login
  3247. pop_up.sign_in(email, password)
  3248. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  3249. sign_in.sign_in(email, password)
  3250. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  3251. self.click_next(expect='password')
  3252. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  3253. *self._checking_email_provider_loading_locator)
  3254. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  3255. 'value': value})['value']
  3256. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  3257. self.error_handler.check_response(response)
  3258. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3259.  
  3260. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea9a001610>
  3261. 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}]}}'}
  3262.  
  3263. def check_response(self, response):
  3264. """
  3265. Checks that a JSON response from the WebDriver does not have an error.
  3266.  
  3267. :Args:
  3268. - response - The JSON response from the WebDriver server as a dictionary
  3269. object.
  3270.  
  3271. :Raises: If the response contains an error message.
  3272. """
  3273. status = response.get('status', None)
  3274. if status is None or status == ErrorCode.SUCCESS:
  3275. return
  3276.  
  3277. value = None
  3278. message = response.get("message", "")
  3279. screen = response.get("screen", "")
  3280. stacktrace = None
  3281. if isinstance(status, int):
  3282. value_json = response.get('value', None)
  3283. if value_json and isinstance(value_json, basestring):
  3284. import json
  3285. try:
  3286. value = json.loads(value_json)
  3287. status = value.get('error', None)
  3288. if status is None:
  3289. status = value["status"]
  3290. message = value["value"]
  3291. if not isinstance(message, basestring):
  3292. value = message
  3293. try:
  3294. message = message['message']
  3295. except TypeError:
  3296. message = None
  3297. else:
  3298. message = value.get('message', None)
  3299. except ValueError:
  3300. pass
  3301.  
  3302. exception_class = ErrorInResponseException
  3303. if status in ErrorCode.NO_SUCH_ELEMENT:
  3304. exception_class = NoSuchElementException
  3305. elif status in ErrorCode.NO_SUCH_FRAME:
  3306. exception_class = NoSuchFrameException
  3307. elif status in ErrorCode.NO_SUCH_WINDOW:
  3308. exception_class = NoSuchWindowException
  3309. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  3310. exception_class = StaleElementReferenceException
  3311. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  3312. exception_class = ElementNotVisibleException
  3313. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  3314. exception_class = InvalidElementStateException
  3315. elif status in ErrorCode.INVALID_SELECTOR \
  3316. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  3317. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  3318. exception_class = InvalidSelectorException
  3319. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  3320. exception_class = ElementNotSelectableException
  3321. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  3322. exception_class = WebDriverException
  3323. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  3324. exception_class = WebDriverException
  3325. elif status in ErrorCode.TIMEOUT:
  3326. exception_class = TimeoutException
  3327. elif status in ErrorCode.SCRIPT_TIMEOUT:
  3328. exception_class = TimeoutException
  3329. elif status in ErrorCode.UNKNOWN_ERROR:
  3330. exception_class = WebDriverException
  3331. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  3332. exception_class = UnexpectedAlertPresentException
  3333. elif status in ErrorCode.NO_ALERT_OPEN:
  3334. exception_class = NoAlertPresentException
  3335. elif status in ErrorCode.IME_NOT_AVAILABLE:
  3336. exception_class = ImeNotAvailableException
  3337. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  3338. exception_class = ImeActivationFailedException
  3339. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  3340. exception_class = MoveTargetOutOfBoundsException
  3341. else:
  3342. exception_class = WebDriverException
  3343. if value == '' or value is None:
  3344. value = response['value']
  3345. if isinstance(value, basestring):
  3346. if exception_class == ErrorInResponseException:
  3347. raise exception_class(response, value)
  3348. raise exception_class(value)
  3349. if message == "" and 'message' in value:
  3350. message = value['message']
  3351.  
  3352. screen = None
  3353. if 'screen' in value:
  3354. screen = value['screen']
  3355.  
  3356. stacktrace = None
  3357. if 'stackTrace' in value and value['stackTrace']:
  3358. stacktrace = []
  3359. try:
  3360. for frame in value['stackTrace']:
  3361. line = self._value_or_default(frame, 'lineNumber', '')
  3362. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  3363. if line:
  3364. file = "%s:%s" % (file, line)
  3365. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  3366. if 'className' in frame:
  3367. meth = "%s.%s" % (frame['className'], meth)
  3368. msg = " at %s (%s)"
  3369. msg = msg % (meth, file)
  3370. stacktrace.append(msg)
  3371. except TypeError:
  3372. pass
  3373. if exception_class == ErrorInResponseException:
  3374. raise exception_class(response, message)
  3375. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  3376. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  3377. > raise exception_class(message, screen, stacktrace)
  3378. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  3379. E Stacktrace:
  3380. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpWaWi6l/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  3381. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpWaWi6l/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  3382.  
  3383. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  3384. ------------------------------- pytest-selenium --------------------------------
  3385. 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
  3386. _______ TestProfile.test_new_user_cannot_see_groups_or_functional_areas ________
  3387. [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  3388. self = <tests.test_profile.TestProfile instance at 0x7f5d19186050>
  3389. base_url = 'https://mozillians.allizom.org'
  3390. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="5d49ec9a-2fa2-4ee1-937c-108c93fe396b")>
  3391. unvouched_user = {'email': 'teovermesantest3@gmail.com', 'name': 'teo test3', 'password': 'mozillatest'}
  3392.  
  3393. @pytest.mark.credentials
  3394. @pytest.mark.nondestructive
  3395. def test_new_user_cannot_see_groups_or_functional_areas(self, base_url, selenium, unvouched_user):
  3396. home_page = Home(base_url, selenium)
  3397. > home_page.login(unvouched_user['email'], unvouched_user['password'])
  3398.  
  3399. tests/test_profile.py:288:
  3400. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3401. pages/base.py:56: in login
  3402. pop_up.sign_in(email, password)
  3403. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  3404. sign_in.sign_in(email, password)
  3405. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  3406. self.click_next(expect='password')
  3407. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  3408. *self._checking_email_provider_loading_locator)
  3409. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  3410. 'value': value})['value']
  3411. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  3412. self.error_handler.check_response(response)
  3413. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3414.  
  3415. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d192014d0>
  3416. 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}]}}'}
  3417.  
  3418. def check_response(self, response):
  3419. """
  3420. Checks that a JSON response from the WebDriver does not have an error.
  3421.  
  3422. :Args:
  3423. - response - The JSON response from the WebDriver server as a dictionary
  3424. object.
  3425.  
  3426. :Raises: If the response contains an error message.
  3427. """
  3428. status = response.get('status', None)
  3429. if status is None or status == ErrorCode.SUCCESS:
  3430. return
  3431.  
  3432. value = None
  3433. message = response.get("message", "")
  3434. screen = response.get("screen", "")
  3435. stacktrace = None
  3436. if isinstance(status, int):
  3437. value_json = response.get('value', None)
  3438. if value_json and isinstance(value_json, basestring):
  3439. import json
  3440. try:
  3441. value = json.loads(value_json)
  3442. status = value.get('error', None)
  3443. if status is None:
  3444. status = value["status"]
  3445. message = value["value"]
  3446. if not isinstance(message, basestring):
  3447. value = message
  3448. try:
  3449. message = message['message']
  3450. except TypeError:
  3451. message = None
  3452. else:
  3453. message = value.get('message', None)
  3454. except ValueError:
  3455. pass
  3456.  
  3457. exception_class = ErrorInResponseException
  3458. if status in ErrorCode.NO_SUCH_ELEMENT:
  3459. exception_class = NoSuchElementException
  3460. elif status in ErrorCode.NO_SUCH_FRAME:
  3461. exception_class = NoSuchFrameException
  3462. elif status in ErrorCode.NO_SUCH_WINDOW:
  3463. exception_class = NoSuchWindowException
  3464. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  3465. exception_class = StaleElementReferenceException
  3466. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  3467. exception_class = ElementNotVisibleException
  3468. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  3469. exception_class = InvalidElementStateException
  3470. elif status in ErrorCode.INVALID_SELECTOR \
  3471. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  3472. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  3473. exception_class = InvalidSelectorException
  3474. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  3475. exception_class = ElementNotSelectableException
  3476. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  3477. exception_class = WebDriverException
  3478. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  3479. exception_class = WebDriverException
  3480. elif status in ErrorCode.TIMEOUT:
  3481. exception_class = TimeoutException
  3482. elif status in ErrorCode.SCRIPT_TIMEOUT:
  3483. exception_class = TimeoutException
  3484. elif status in ErrorCode.UNKNOWN_ERROR:
  3485. exception_class = WebDriverException
  3486. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  3487. exception_class = UnexpectedAlertPresentException
  3488. elif status in ErrorCode.NO_ALERT_OPEN:
  3489. exception_class = NoAlertPresentException
  3490. elif status in ErrorCode.IME_NOT_AVAILABLE:
  3491. exception_class = ImeNotAvailableException
  3492. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  3493. exception_class = ImeActivationFailedException
  3494. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  3495. exception_class = MoveTargetOutOfBoundsException
  3496. else:
  3497. exception_class = WebDriverException
  3498. if value == '' or value is None:
  3499. value = response['value']
  3500. if isinstance(value, basestring):
  3501. if exception_class == ErrorInResponseException:
  3502. raise exception_class(response, value)
  3503. raise exception_class(value)
  3504. if message == "" and 'message' in value:
  3505. message = value['message']
  3506.  
  3507. screen = None
  3508. if 'screen' in value:
  3509. screen = value['screen']
  3510.  
  3511. stacktrace = None
  3512. if 'stackTrace' in value and value['stackTrace']:
  3513. stacktrace = []
  3514. try:
  3515. for frame in value['stackTrace']:
  3516. line = self._value_or_default(frame, 'lineNumber', '')
  3517. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  3518. if line:
  3519. file = "%s:%s" % (file, line)
  3520. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  3521. if 'className' in frame:
  3522. meth = "%s.%s" % (frame['className'], meth)
  3523. msg = " at %s (%s)"
  3524. msg = msg % (meth, file)
  3525. stacktrace.append(msg)
  3526. except TypeError:
  3527. pass
  3528. if exception_class == ErrorInResponseException:
  3529. raise exception_class(response, message)
  3530. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  3531. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  3532. > raise exception_class(message, screen, stacktrace)
  3533. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  3534. E Stacktrace:
  3535. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpB9KXQ0/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  3536. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpB9KXQ0/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  3537.  
  3538. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  3539. ------------------------------- pytest-selenium --------------------------------
  3540. 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
  3541. ___________ TestProfile.test_private_groups_field_when_not_logged_in ___________
  3542. [gw3] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  3543. self = <tests.test_profile.TestProfile instance at 0x7f36346bb9e0>
  3544. base_url = 'https://mozillians.allizom.org'
  3545. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="97f2c6d2-1fbc-42e2-a31b-7bfd26dee860")>
  3546. private_user = {'email': 'teovermesantest2@gmail.com', 'name': 'teo test2', 'password': 'mozillatest'}
  3547.  
  3548. @pytest.mark.credentials
  3549. @pytest.mark.nondestructive
  3550. def test_private_groups_field_when_not_logged_in(self, base_url, selenium, private_user):
  3551. home_page = Home(base_url, selenium)
  3552. > profile_page = home_page.open_user_profile(private_user['name'])
  3553.  
  3554. tests/test_profile.py:215:
  3555. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3556. pages/base.py:82: in open_user_profile
  3557. return Profile(self.base_url, self.selenium)
  3558. pages/profile.py:37: in __init__
  3559. lambda s: self.is_element_visible(*self._profile_photo_locator))
  3560. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3561.  
  3562. self = <selenium.webdriver.support.wait.WebDriverWait (session="97f2c6d2-1fbc-42e2-a31b-7bfd26dee860")>
  3563. method = <function <lambda> at 0x7f362f88c9b0>, message = ''
  3564.  
  3565. def until(self, method, message=''):
  3566. """Calls the method provided with the driver as an argument until the \
  3567. return value is not False."""
  3568. screen = None
  3569. stacktrace = None
  3570.  
  3571. end_time = time.time() + self._timeout
  3572. while True:
  3573. try:
  3574. value = method(self._driver)
  3575. if value:
  3576. return value
  3577. except self._ignored_exceptions as exc:
  3578. screen = getattr(exc, 'screen', None)
  3579. stacktrace = getattr(exc, 'stacktrace', None)
  3580. time.sleep(self._poll)
  3581. if time.time() > end_time:
  3582. break
  3583. > raise TimeoutException(message, screen, stacktrace)
  3584. E TimeoutException: Message:
  3585.  
  3586. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/support/wait.py:80: TimeoutException
  3587. ------------------------------- pytest-selenium --------------------------------
  3588. URL: https://mozillians.allizom.org/en-US/u/teo%20test2
  3589. __________ TestSearch.test_that_search_returns_results_for_first_name __________
  3590. [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  3591. self = <tests.test_search.TestSearch instance at 0x7fea9ad55290>
  3592. base_url = 'https://mozillians.allizom.org'
  3593. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="2637e38a-c5a5-4c5c-9d33-522e8295ecf7")>
  3594. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  3595.  
  3596. @pytest.mark.credentials
  3597. @pytest.mark.nondestructive
  3598. def test_that_search_returns_results_for_first_name(self, base_url, selenium, vouched_user):
  3599. query = u'Matt'
  3600. home_page = Home(base_url, selenium)
  3601. > home_page.login(vouched_user['email'], vouched_user['password'])
  3602.  
  3603. tests/test_search.py:33:
  3604. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3605. pages/base.py:56: in login
  3606. pop_up.sign_in(email, password)
  3607. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  3608. sign_in.sign_in(email, password)
  3609. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  3610. self.click_next(expect='password')
  3611. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  3612. *self._checking_email_provider_loading_locator)
  3613. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  3614. 'value': value})['value']
  3615. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  3616. self.error_handler.check_response(response)
  3617. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3618.  
  3619. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea99f793d0>
  3620. 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}]}}'}
  3621.  
  3622. def check_response(self, response):
  3623. """
  3624. Checks that a JSON response from the WebDriver does not have an error.
  3625.  
  3626. :Args:
  3627. - response - The JSON response from the WebDriver server as a dictionary
  3628. object.
  3629.  
  3630. :Raises: If the response contains an error message.
  3631. """
  3632. status = response.get('status', None)
  3633. if status is None or status == ErrorCode.SUCCESS:
  3634. return
  3635.  
  3636. value = None
  3637. message = response.get("message", "")
  3638. screen = response.get("screen", "")
  3639. stacktrace = None
  3640. if isinstance(status, int):
  3641. value_json = response.get('value', None)
  3642. if value_json and isinstance(value_json, basestring):
  3643. import json
  3644. try:
  3645. value = json.loads(value_json)
  3646. status = value.get('error', None)
  3647. if status is None:
  3648. status = value["status"]
  3649. message = value["value"]
  3650. if not isinstance(message, basestring):
  3651. value = message
  3652. try:
  3653. message = message['message']
  3654. except TypeError:
  3655. message = None
  3656. else:
  3657. message = value.get('message', None)
  3658. except ValueError:
  3659. pass
  3660.  
  3661. exception_class = ErrorInResponseException
  3662. if status in ErrorCode.NO_SUCH_ELEMENT:
  3663. exception_class = NoSuchElementException
  3664. elif status in ErrorCode.NO_SUCH_FRAME:
  3665. exception_class = NoSuchFrameException
  3666. elif status in ErrorCode.NO_SUCH_WINDOW:
  3667. exception_class = NoSuchWindowException
  3668. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  3669. exception_class = StaleElementReferenceException
  3670. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  3671. exception_class = ElementNotVisibleException
  3672. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  3673. exception_class = InvalidElementStateException
  3674. elif status in ErrorCode.INVALID_SELECTOR \
  3675. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  3676. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  3677. exception_class = InvalidSelectorException
  3678. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  3679. exception_class = ElementNotSelectableException
  3680. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  3681. exception_class = WebDriverException
  3682. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  3683. exception_class = WebDriverException
  3684. elif status in ErrorCode.TIMEOUT:
  3685. exception_class = TimeoutException
  3686. elif status in ErrorCode.SCRIPT_TIMEOUT:
  3687. exception_class = TimeoutException
  3688. elif status in ErrorCode.UNKNOWN_ERROR:
  3689. exception_class = WebDriverException
  3690. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  3691. exception_class = UnexpectedAlertPresentException
  3692. elif status in ErrorCode.NO_ALERT_OPEN:
  3693. exception_class = NoAlertPresentException
  3694. elif status in ErrorCode.IME_NOT_AVAILABLE:
  3695. exception_class = ImeNotAvailableException
  3696. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  3697. exception_class = ImeActivationFailedException
  3698. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  3699. exception_class = MoveTargetOutOfBoundsException
  3700. else:
  3701. exception_class = WebDriverException
  3702. if value == '' or value is None:
  3703. value = response['value']
  3704. if isinstance(value, basestring):
  3705. if exception_class == ErrorInResponseException:
  3706. raise exception_class(response, value)
  3707. raise exception_class(value)
  3708. if message == "" and 'message' in value:
  3709. message = value['message']
  3710.  
  3711. screen = None
  3712. if 'screen' in value:
  3713. screen = value['screen']
  3714.  
  3715. stacktrace = None
  3716. if 'stackTrace' in value and value['stackTrace']:
  3717. stacktrace = []
  3718. try:
  3719. for frame in value['stackTrace']:
  3720. line = self._value_or_default(frame, 'lineNumber', '')
  3721. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  3722. if line:
  3723. file = "%s:%s" % (file, line)
  3724. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  3725. if 'className' in frame:
  3726. meth = "%s.%s" % (frame['className'], meth)
  3727. msg = " at %s (%s)"
  3728. msg = msg % (meth, file)
  3729. stacktrace.append(msg)
  3730. except TypeError:
  3731. pass
  3732. if exception_class == ErrorInResponseException:
  3733. raise exception_class(response, message)
  3734. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  3735. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  3736. > raise exception_class(message, screen, stacktrace)
  3737. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  3738. E Stacktrace:
  3739. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmp3ocsES/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  3740. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmp3ocsES/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  3741.  
  3742. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  3743. ------------------------------- pytest-selenium --------------------------------
  3744. 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
  3745. _________ TestSearch.test_that_search_returns_results_for_irc_nickname _________
  3746. [gw1] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  3747. self = <tests.test_search.TestSearch instance at 0x7fea9a014560>
  3748. base_url = 'https://mozillians.allizom.org'
  3749. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="5d0a037f-f884-44f7-9a10-65ef85611fc6")>
  3750. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  3751.  
  3752. @pytest.mark.credentials
  3753. @pytest.mark.nondestructive
  3754. def test_that_search_returns_results_for_irc_nickname(self, base_url, selenium, vouched_user):
  3755. home_page = Home(base_url, selenium)
  3756. > home_page.login(vouched_user['email'], vouched_user['password'])
  3757.  
  3758. tests/test_search.py:45:
  3759. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3760. pages/base.py:56: in login
  3761. pop_up.sign_in(email, password)
  3762. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  3763. sign_in.sign_in(email, password)
  3764. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  3765. self.click_next(expect='password')
  3766. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  3767. *self._checking_email_provider_loading_locator)
  3768. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  3769. 'value': value})['value']
  3770. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  3771. self.error_handler.check_response(response)
  3772. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3773.  
  3774. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7fea99f89950>
  3775. 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}]}}'}
  3776.  
  3777. def check_response(self, response):
  3778. """
  3779. Checks that a JSON response from the WebDriver does not have an error.
  3780.  
  3781. :Args:
  3782. - response - The JSON response from the WebDriver server as a dictionary
  3783. object.
  3784.  
  3785. :Raises: If the response contains an error message.
  3786. """
  3787. status = response.get('status', None)
  3788. if status is None or status == ErrorCode.SUCCESS:
  3789. return
  3790.  
  3791. value = None
  3792. message = response.get("message", "")
  3793. screen = response.get("screen", "")
  3794. stacktrace = None
  3795. if isinstance(status, int):
  3796. value_json = response.get('value', None)
  3797. if value_json and isinstance(value_json, basestring):
  3798. import json
  3799. try:
  3800. value = json.loads(value_json)
  3801. status = value.get('error', None)
  3802. if status is None:
  3803. status = value["status"]
  3804. message = value["value"]
  3805. if not isinstance(message, basestring):
  3806. value = message
  3807. try:
  3808. message = message['message']
  3809. except TypeError:
  3810. message = None
  3811. else:
  3812. message = value.get('message', None)
  3813. except ValueError:
  3814. pass
  3815.  
  3816. exception_class = ErrorInResponseException
  3817. if status in ErrorCode.NO_SUCH_ELEMENT:
  3818. exception_class = NoSuchElementException
  3819. elif status in ErrorCode.NO_SUCH_FRAME:
  3820. exception_class = NoSuchFrameException
  3821. elif status in ErrorCode.NO_SUCH_WINDOW:
  3822. exception_class = NoSuchWindowException
  3823. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  3824. exception_class = StaleElementReferenceException
  3825. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  3826. exception_class = ElementNotVisibleException
  3827. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  3828. exception_class = InvalidElementStateException
  3829. elif status in ErrorCode.INVALID_SELECTOR \
  3830. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  3831. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  3832. exception_class = InvalidSelectorException
  3833. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  3834. exception_class = ElementNotSelectableException
  3835. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  3836. exception_class = WebDriverException
  3837. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  3838. exception_class = WebDriverException
  3839. elif status in ErrorCode.TIMEOUT:
  3840. exception_class = TimeoutException
  3841. elif status in ErrorCode.SCRIPT_TIMEOUT:
  3842. exception_class = TimeoutException
  3843. elif status in ErrorCode.UNKNOWN_ERROR:
  3844. exception_class = WebDriverException
  3845. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  3846. exception_class = UnexpectedAlertPresentException
  3847. elif status in ErrorCode.NO_ALERT_OPEN:
  3848. exception_class = NoAlertPresentException
  3849. elif status in ErrorCode.IME_NOT_AVAILABLE:
  3850. exception_class = ImeNotAvailableException
  3851. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  3852. exception_class = ImeActivationFailedException
  3853. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  3854. exception_class = MoveTargetOutOfBoundsException
  3855. else:
  3856. exception_class = WebDriverException
  3857. if value == '' or value is None:
  3858. value = response['value']
  3859. if isinstance(value, basestring):
  3860. if exception_class == ErrorInResponseException:
  3861. raise exception_class(response, value)
  3862. raise exception_class(value)
  3863. if message == "" and 'message' in value:
  3864. message = value['message']
  3865.  
  3866. screen = None
  3867. if 'screen' in value:
  3868. screen = value['screen']
  3869.  
  3870. stacktrace = None
  3871. if 'stackTrace' in value and value['stackTrace']:
  3872. stacktrace = []
  3873. try:
  3874. for frame in value['stackTrace']:
  3875. line = self._value_or_default(frame, 'lineNumber', '')
  3876. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  3877. if line:
  3878. file = "%s:%s" % (file, line)
  3879. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  3880. if 'className' in frame:
  3881. meth = "%s.%s" % (frame['className'], meth)
  3882. msg = " at %s (%s)"
  3883. msg = msg % (meth, file)
  3884. stacktrace.append(msg)
  3885. except TypeError:
  3886. pass
  3887. if exception_class == ErrorInResponseException:
  3888. raise exception_class(response, message)
  3889. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  3890. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  3891. > raise exception_class(message, screen, stacktrace)
  3892. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  3893. E Stacktrace:
  3894. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpvOQmL1/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  3895. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpvOQmL1/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  3896.  
  3897. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  3898. ------------------------------- pytest-selenium --------------------------------
  3899. 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
  3900. _______ TestSearch.test_that_search_returns_results_for_email_substring ________
  3901. [gw2] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  3902. self = <tests.test_search.TestSearch instance at 0x7f254c43b758>
  3903. base_url = 'https://mozillians.allizom.org'
  3904. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="b19151e8-fae7-4912-a486-5ab5935b91cf")>
  3905. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  3906.  
  3907. @pytest.mark.xfail("'mozillians-dev' in config.getvalue('base_url')",
  3908. reason="Bug 944101 - Searching by email substring does not return all results")
  3909. @pytest.mark.credentials
  3910. @pytest.mark.nondestructive
  3911. def test_that_search_returns_results_for_email_substring(self, base_url, selenium, vouched_user):
  3912. home_page = Home(base_url, selenium)
  3913. > home_page.login(vouched_user['email'], vouched_user['password'])
  3914.  
  3915. tests/test_search.py:24:
  3916. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3917. pages/base.py:56: in login
  3918. pop_up.sign_in(email, password)
  3919. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  3920. sign_in.sign_in(email, password)
  3921. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  3922. self.click_next(expect='password')
  3923. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  3924. *self._checking_email_provider_loading_locator)
  3925. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  3926. 'value': value})['value']
  3927. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  3928. self.error_handler.check_response(response)
  3929. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  3930.  
  3931. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f254c5eeb10>
  3932. 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}]}}'}
  3933.  
  3934. def check_response(self, response):
  3935. """
  3936. Checks that a JSON response from the WebDriver does not have an error.
  3937.  
  3938. :Args:
  3939. - response - The JSON response from the WebDriver server as a dictionary
  3940. object.
  3941.  
  3942. :Raises: If the response contains an error message.
  3943. """
  3944. status = response.get('status', None)
  3945. if status is None or status == ErrorCode.SUCCESS:
  3946. return
  3947.  
  3948. value = None
  3949. message = response.get("message", "")
  3950. screen = response.get("screen", "")
  3951. stacktrace = None
  3952. if isinstance(status, int):
  3953. value_json = response.get('value', None)
  3954. if value_json and isinstance(value_json, basestring):
  3955. import json
  3956. try:
  3957. value = json.loads(value_json)
  3958. status = value.get('error', None)
  3959. if status is None:
  3960. status = value["status"]
  3961. message = value["value"]
  3962. if not isinstance(message, basestring):
  3963. value = message
  3964. try:
  3965. message = message['message']
  3966. except TypeError:
  3967. message = None
  3968. else:
  3969. message = value.get('message', None)
  3970. except ValueError:
  3971. pass
  3972.  
  3973. exception_class = ErrorInResponseException
  3974. if status in ErrorCode.NO_SUCH_ELEMENT:
  3975. exception_class = NoSuchElementException
  3976. elif status in ErrorCode.NO_SUCH_FRAME:
  3977. exception_class = NoSuchFrameException
  3978. elif status in ErrorCode.NO_SUCH_WINDOW:
  3979. exception_class = NoSuchWindowException
  3980. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  3981. exception_class = StaleElementReferenceException
  3982. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  3983. exception_class = ElementNotVisibleException
  3984. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  3985. exception_class = InvalidElementStateException
  3986. elif status in ErrorCode.INVALID_SELECTOR \
  3987. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  3988. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  3989. exception_class = InvalidSelectorException
  3990. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  3991. exception_class = ElementNotSelectableException
  3992. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  3993. exception_class = WebDriverException
  3994. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  3995. exception_class = WebDriverException
  3996. elif status in ErrorCode.TIMEOUT:
  3997. exception_class = TimeoutException
  3998. elif status in ErrorCode.SCRIPT_TIMEOUT:
  3999. exception_class = TimeoutException
  4000. elif status in ErrorCode.UNKNOWN_ERROR:
  4001. exception_class = WebDriverException
  4002. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  4003. exception_class = UnexpectedAlertPresentException
  4004. elif status in ErrorCode.NO_ALERT_OPEN:
  4005. exception_class = NoAlertPresentException
  4006. elif status in ErrorCode.IME_NOT_AVAILABLE:
  4007. exception_class = ImeNotAvailableException
  4008. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  4009. exception_class = ImeActivationFailedException
  4010. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  4011. exception_class = MoveTargetOutOfBoundsException
  4012. else:
  4013. exception_class = WebDriverException
  4014. if value == '' or value is None:
  4015. value = response['value']
  4016. if isinstance(value, basestring):
  4017. if exception_class == ErrorInResponseException:
  4018. raise exception_class(response, value)
  4019. raise exception_class(value)
  4020. if message == "" and 'message' in value:
  4021. message = value['message']
  4022.  
  4023. screen = None
  4024. if 'screen' in value:
  4025. screen = value['screen']
  4026.  
  4027. stacktrace = None
  4028. if 'stackTrace' in value and value['stackTrace']:
  4029. stacktrace = []
  4030. try:
  4031. for frame in value['stackTrace']:
  4032. line = self._value_or_default(frame, 'lineNumber', '')
  4033. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  4034. if line:
  4035. file = "%s:%s" % (file, line)
  4036. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  4037. if 'className' in frame:
  4038. meth = "%s.%s" % (frame['className'], meth)
  4039. msg = " at %s (%s)"
  4040. msg = msg % (meth, file)
  4041. stacktrace.append(msg)
  4042. except TypeError:
  4043. pass
  4044. if exception_class == ErrorInResponseException:
  4045. raise exception_class(response, message)
  4046. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  4047. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  4048. > raise exception_class(message, screen, stacktrace)
  4049. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  4050. E Stacktrace:
  4051. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpE5Fw_Q/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  4052. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpE5Fw_Q/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  4053.  
  4054. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  4055. ------------------------------- pytest-selenium --------------------------------
  4056. 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
  4057. _____ TestProfile.test_that_user_can_modify_external_accounts_irc_nickname _____
  4058. [gw3] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  4059. self = <tests.test_profile.TestProfile instance at 0x7f362fda6830>
  4060. base_url = 'https://mozillians.allizom.org'
  4061. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="ec81104c-a0bf-4230-a9cd-f6a182e77894")>
  4062. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  4063.  
  4064. @pytest.mark.credentials
  4065. def test_that_user_can_modify_external_accounts_irc_nickname(self, base_url, selenium, vouched_user):
  4066. home_page = Home(base_url, selenium)
  4067. > home_page.login(vouched_user['email'], vouched_user['password'])
  4068.  
  4069. tests/test_profile.py:264:
  4070. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  4071. pages/base.py:56: in login
  4072. pop_up.sign_in(email, password)
  4073. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  4074. sign_in.sign_in(email, password)
  4075. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  4076. self.click_next(expect='password')
  4077. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  4078. *self._checking_email_provider_loading_locator)
  4079. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  4080. 'value': value})['value']
  4081. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  4082. self.error_handler.check_response(response)
  4083. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  4084.  
  4085. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f362fddaa50>
  4086. 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}]}}'}
  4087.  
  4088. def check_response(self, response):
  4089. """
  4090. Checks that a JSON response from the WebDriver does not have an error.
  4091.  
  4092. :Args:
  4093. - response - The JSON response from the WebDriver server as a dictionary
  4094. object.
  4095.  
  4096. :Raises: If the response contains an error message.
  4097. """
  4098. status = response.get('status', None)
  4099. if status is None or status == ErrorCode.SUCCESS:
  4100. return
  4101.  
  4102. value = None
  4103. message = response.get("message", "")
  4104. screen = response.get("screen", "")
  4105. stacktrace = None
  4106. if isinstance(status, int):
  4107. value_json = response.get('value', None)
  4108. if value_json and isinstance(value_json, basestring):
  4109. import json
  4110. try:
  4111. value = json.loads(value_json)
  4112. status = value.get('error', None)
  4113. if status is None:
  4114. status = value["status"]
  4115. message = value["value"]
  4116. if not isinstance(message, basestring):
  4117. value = message
  4118. try:
  4119. message = message['message']
  4120. except TypeError:
  4121. message = None
  4122. else:
  4123. message = value.get('message', None)
  4124. except ValueError:
  4125. pass
  4126.  
  4127. exception_class = ErrorInResponseException
  4128. if status in ErrorCode.NO_SUCH_ELEMENT:
  4129. exception_class = NoSuchElementException
  4130. elif status in ErrorCode.NO_SUCH_FRAME:
  4131. exception_class = NoSuchFrameException
  4132. elif status in ErrorCode.NO_SUCH_WINDOW:
  4133. exception_class = NoSuchWindowException
  4134. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  4135. exception_class = StaleElementReferenceException
  4136. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  4137. exception_class = ElementNotVisibleException
  4138. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  4139. exception_class = InvalidElementStateException
  4140. elif status in ErrorCode.INVALID_SELECTOR \
  4141. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  4142. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  4143. exception_class = InvalidSelectorException
  4144. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  4145. exception_class = ElementNotSelectableException
  4146. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  4147. exception_class = WebDriverException
  4148. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  4149. exception_class = WebDriverException
  4150. elif status in ErrorCode.TIMEOUT:
  4151. exception_class = TimeoutException
  4152. elif status in ErrorCode.SCRIPT_TIMEOUT:
  4153. exception_class = TimeoutException
  4154. elif status in ErrorCode.UNKNOWN_ERROR:
  4155. exception_class = WebDriverException
  4156. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  4157. exception_class = UnexpectedAlertPresentException
  4158. elif status in ErrorCode.NO_ALERT_OPEN:
  4159. exception_class = NoAlertPresentException
  4160. elif status in ErrorCode.IME_NOT_AVAILABLE:
  4161. exception_class = ImeNotAvailableException
  4162. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  4163. exception_class = ImeActivationFailedException
  4164. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  4165. exception_class = MoveTargetOutOfBoundsException
  4166. else:
  4167. exception_class = WebDriverException
  4168. if value == '' or value is None:
  4169. value = response['value']
  4170. if isinstance(value, basestring):
  4171. if exception_class == ErrorInResponseException:
  4172. raise exception_class(response, value)
  4173. raise exception_class(value)
  4174. if message == "" and 'message' in value:
  4175. message = value['message']
  4176.  
  4177. screen = None
  4178. if 'screen' in value:
  4179. screen = value['screen']
  4180.  
  4181. stacktrace = None
  4182. if 'stackTrace' in value and value['stackTrace']:
  4183. stacktrace = []
  4184. try:
  4185. for frame in value['stackTrace']:
  4186. line = self._value_or_default(frame, 'lineNumber', '')
  4187. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  4188. if line:
  4189. file = "%s:%s" % (file, line)
  4190. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  4191. if 'className' in frame:
  4192. meth = "%s.%s" % (frame['className'], meth)
  4193. msg = " at %s (%s)"
  4194. msg = msg % (meth, file)
  4195. stacktrace.append(msg)
  4196. except TypeError:
  4197. pass
  4198. if exception_class == ErrorInResponseException:
  4199. raise exception_class(response, message)
  4200. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  4201. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  4202. > raise exception_class(message, screen, stacktrace)
  4203. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  4204. E Stacktrace:
  4205. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpYiaGFc/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  4206. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpYiaGFc/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  4207.  
  4208. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  4209. ------------------------------- pytest-selenium --------------------------------
  4210. 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
  4211. _______ TestSearch.test_search_for_not_existing_mozillian_when_logged_in _______
  4212. [gw0] linux2 -- Python 2.7.12 /home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/python
  4213. self = <tests.test_search.TestSearch instance at 0x7f5d18f82e18>
  4214. base_url = 'https://mozillians.allizom.org'
  4215. selenium = <selenium.webdriver.firefox.webdriver.WebDriver (session="d0ceb1de-0d54-4ae6-899f-361499c599de")>
  4216. vouched_user = {'email': 'teovermesantest@gmail.com', 'name': 'teo test', 'password': 'mozillatest'}
  4217.  
  4218. @pytest.mark.credentials
  4219. @pytest.mark.nondestructive
  4220. def test_search_for_not_existing_mozillian_when_logged_in(self, base_url, selenium, vouched_user):
  4221. query = u'Qwerty'
  4222. home_page = Home(base_url, selenium)
  4223. > home_page.login(vouched_user['email'], vouched_user['password'])
  4224.  
  4225. tests/test_search.py:55:
  4226. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  4227. pages/base.py:56: in login
  4228. pop_up.sign_in(email, password)
  4229. .tox/tests/local/lib/python2.7/site-packages/browserid/browser_id.py:22: in sign_in
  4230. sign_in.sign_in(email, password)
  4231. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:294: in sign_in
  4232. self.click_next(expect='password')
  4233. .tox/tests/local/lib/python2.7/site-packages/browserid/pages/sign_in.py:204: in click_next
  4234. *self._checking_email_provider_loading_locator)
  4235. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:752: in find_element
  4236. 'value': value})['value']
  4237. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:236: in execute
  4238. self.error_handler.check_response(response)
  4239. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  4240.  
  4241. self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f5d18d52710>
  4242. 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}]}}'}
  4243.  
  4244. def check_response(self, response):
  4245. """
  4246. Checks that a JSON response from the WebDriver does not have an error.
  4247.  
  4248. :Args:
  4249. - response - The JSON response from the WebDriver server as a dictionary
  4250. object.
  4251.  
  4252. :Raises: If the response contains an error message.
  4253. """
  4254. status = response.get('status', None)
  4255. if status is None or status == ErrorCode.SUCCESS:
  4256. return
  4257.  
  4258. value = None
  4259. message = response.get("message", "")
  4260. screen = response.get("screen", "")
  4261. stacktrace = None
  4262. if isinstance(status, int):
  4263. value_json = response.get('value', None)
  4264. if value_json and isinstance(value_json, basestring):
  4265. import json
  4266. try:
  4267. value = json.loads(value_json)
  4268. status = value.get('error', None)
  4269. if status is None:
  4270. status = value["status"]
  4271. message = value["value"]
  4272. if not isinstance(message, basestring):
  4273. value = message
  4274. try:
  4275. message = message['message']
  4276. except TypeError:
  4277. message = None
  4278. else:
  4279. message = value.get('message', None)
  4280. except ValueError:
  4281. pass
  4282.  
  4283. exception_class = ErrorInResponseException
  4284. if status in ErrorCode.NO_SUCH_ELEMENT:
  4285. exception_class = NoSuchElementException
  4286. elif status in ErrorCode.NO_SUCH_FRAME:
  4287. exception_class = NoSuchFrameException
  4288. elif status in ErrorCode.NO_SUCH_WINDOW:
  4289. exception_class = NoSuchWindowException
  4290. elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
  4291. exception_class = StaleElementReferenceException
  4292. elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
  4293. exception_class = ElementNotVisibleException
  4294. elif status in ErrorCode.INVALID_ELEMENT_STATE:
  4295. exception_class = InvalidElementStateException
  4296. elif status in ErrorCode.INVALID_SELECTOR \
  4297. or status in ErrorCode.INVALID_XPATH_SELECTOR \
  4298. or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
  4299. exception_class = InvalidSelectorException
  4300. elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
  4301. exception_class = ElementNotSelectableException
  4302. elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
  4303. exception_class = WebDriverException
  4304. elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
  4305. exception_class = WebDriverException
  4306. elif status in ErrorCode.TIMEOUT:
  4307. exception_class = TimeoutException
  4308. elif status in ErrorCode.SCRIPT_TIMEOUT:
  4309. exception_class = TimeoutException
  4310. elif status in ErrorCode.UNKNOWN_ERROR:
  4311. exception_class = WebDriverException
  4312. elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
  4313. exception_class = UnexpectedAlertPresentException
  4314. elif status in ErrorCode.NO_ALERT_OPEN:
  4315. exception_class = NoAlertPresentException
  4316. elif status in ErrorCode.IME_NOT_AVAILABLE:
  4317. exception_class = ImeNotAvailableException
  4318. elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
  4319. exception_class = ImeActivationFailedException
  4320. elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
  4321. exception_class = MoveTargetOutOfBoundsException
  4322. else:
  4323. exception_class = WebDriverException
  4324. if value == '' or value is None:
  4325. value = response['value']
  4326. if isinstance(value, basestring):
  4327. if exception_class == ErrorInResponseException:
  4328. raise exception_class(response, value)
  4329. raise exception_class(value)
  4330. if message == "" and 'message' in value:
  4331. message = value['message']
  4332.  
  4333. screen = None
  4334. if 'screen' in value:
  4335. screen = value['screen']
  4336.  
  4337. stacktrace = None
  4338. if 'stackTrace' in value and value['stackTrace']:
  4339. stacktrace = []
  4340. try:
  4341. for frame in value['stackTrace']:
  4342. line = self._value_or_default(frame, 'lineNumber', '')
  4343. file = self._value_or_default(frame, 'fileName', '<anonymous>')
  4344. if line:
  4345. file = "%s:%s" % (file, line)
  4346. meth = self._value_or_default(frame, 'methodName', '<anonymous>')
  4347. if 'className' in frame:
  4348. meth = "%s.%s" % (frame['className'], meth)
  4349. msg = " at %s (%s)"
  4350. msg = msg % (meth, file)
  4351. stacktrace.append(msg)
  4352. except TypeError:
  4353. pass
  4354. if exception_class == ErrorInResponseException:
  4355. raise exception_class(response, message)
  4356. elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  4357. raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  4358. > raise exception_class(message, screen, stacktrace)
  4359. E NoSuchElementException: Message: Unable to locate element: {"method":"css selector","selector":"#load .loadingSpinner"}
  4360. E Stacktrace:
  4361. E at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmprBK3iM/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
  4362. E at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmprBK3iM/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
  4363.  
  4364. .tox/tests/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py:192: NoSuchElementException
  4365. ------------------------------- pytest-selenium --------------------------------
  4366. 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
  4367. =============== 28 failed, 9 passed, 1 xfailed in 224.72 seconds ===============
  4368. ERROR: InvocationError: '/home/teodora.vermesan/Desktop/parsys/mozillians-tests/.tox/tests/bin/pytest'
  4369. 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
  4370. flake8 runtests: PYTHONHASHSEED='1736516969'
  4371. flake8 runtests: commands[0] | flake8 .
  4372. ___________________________________ summary ____________________________________
  4373. ERROR: tests: commands failed
  4374. flake8: commands succeeded
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement