Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tests.desktop.test_search.TestSearch.test_searching_for_addon_type_returns_results_of_correct_type[Collections-web-Collections] (from )
- Failing for the past 1 build (Since Failed#2005 )
- Took 1 min 52 sec.
- add description
- Error Message
- test failure
- Stacktrace
- self = <tests.desktop.test_search.TestSearch instance at 0x10a9c8b48>
- mozwebqa = <pytest_mozwebqa.pytest_mozwebqa.TestSetup instance at 0x10a81e170>
- addon_type = 'Collections', term = 'web', breadcrumb_component = 'Collections'
- @pytest.mark.xfail("'addons.allizom' in config.getvalue('base_url')",
- reason='https://github.com/mozilla/Addon-Tests/issues/728')
- @pytest.mark.native
- @pytest.mark.nondestructive
- @pytest.mark.smoke
- @pytest.mark.parametrize(('addon_type', 'term', 'breadcrumb_component'), [
- ('Complete Themes', 'nasa', 'Complete Themes'), # 17350
- ('Extensions', 'fire', 'Extensions'),
- ('Themes', 'fox', 'Themes'), # 17349
- ('Collections', 'web', 'Collections'), # 17352
- # these last two depend on the More menu
- # ('Add-ons for Mobile', 'fire', 'Extensions')
- # ('Dictionaries & Language Packs', 'a', 'Dictionaries'),
- ])
- def test_searching_for_addon_type_returns_results_of_correct_type(
- self, mozwebqa, addon_type, term, breadcrumb_component
- ):
- amo_home_page = Home(mozwebqa)
- if (addon_type == 'Complete Themes'):
- # Complete Themes are in a subnav, so must be clicked differently
- amo_addon_type_page = amo_home_page.header.click_complete_themes()
- else:
- amo_addon_type_page = amo_home_page.header.site_navigation_menu(addon_type).click()
- search_results = amo_addon_type_page.search_for(term)
- Assert.true(search_results.result_count > 0)
- for i in range(search_results.result_count):
- addon = search_results.result(i).click_result()
- > Assert.contains(breadcrumb_component, addon.breadcrumb)
- tests/desktop/test_search.py:234:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <pages.desktop.collections.Collection object at 0x10a9bd1d0>
- @property
- def breadcrumb(self):
- > return self.selenium.find_element(*self._breadcrumb_locator).text
- pages/desktop/collections.py:88:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.webdriver.WebDriver object at 0x10a82f410>
- by = 'id', value = 'breadcrumbs'
- def find_element(self, by=By.ID, value=None):
- """
- 'Private' method used by the find_element_by_* methods.
- :Usage:
- Use the corresponding find_element_by_* instead of this.
- :rtype: WebElement
- """
- if not By.is_valid(by) or not isinstance(value, str):
- raise InvalidSelectorException("Invalid locator values passed in")
- return self.execute(Command.FIND_ELEMENT,
- > {'using': by, 'value': value})['value']
- .env/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:662:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.webdriver.WebDriver object at 0x10a82f410>
- driver_command = 'findElement'
- params = {'sessionId': u'4b8d809d7d3d4b9c8500369ea1615ef0', 'using': 'id', 'value': 'breadcrumbs'}
- def execute(self, driver_command, params=None):
- """
- Sends a command to be executed by a command.CommandExecutor.
- :Args:
- - driver_command: The name of the command to execute as a string.
- - params: A dictionary of named parameters to send with the command.
- :Returns:
- The command's JSON response loaded into a dictionary object.
- """
- if self.session_id is not None:
- if not params:
- params = {'sessionId': self.session_id}
- elif 'sessionId' not in params:
- params['sessionId'] = self.session_id
- params = self._wrap_value(params)
- response = self.command_executor.execute(driver_command, params)
- if response:
- > self.error_handler.check_response(response)
- .env/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py:173:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x10a834490>
- response = {u'class': u'org.openqa.selenium.remote.Response', u'hCode': 17068716, u'sessionId': u'4b8d809d7d3d4b9c8500369ea1615ef0', u'state': u'no such element', ...}
- def check_response(self, response):
- """
- Checks that a JSON response from the WebDriver does not have an error.
- :Args:
- - response - The JSON response from the WebDriver server as a dictionary
- object.
- :Raises: If the response contains an error message.
- """
- status = response['status']
- if status == ErrorCode.SUCCESS:
- return
- exception_class = ErrorInResponseException
- if status in ErrorCode.NO_SUCH_ELEMENT:
- exception_class = NoSuchElementException
- elif status in ErrorCode.NO_SUCH_FRAME:
- exception_class = NoSuchFrameException
- elif status in ErrorCode.NO_SUCH_WINDOW:
- exception_class = NoSuchWindowException
- elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
- exception_class = StaleElementReferenceException
- elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
- exception_class = ElementNotVisibleException
- elif status in ErrorCode.INVALID_ELEMENT_STATE:
- exception_class = InvalidElementStateException
- elif status in ErrorCode.INVALID_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR \
- or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
- exception_class = InvalidSelectorException
- elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
- exception_class = ElementNotSelectableException
- elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
- exception_class = WebDriverException
- elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
- exception_class = WebDriverException
- elif status in ErrorCode.TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.SCRIPT_TIMEOUT:
- exception_class = TimeoutException
- elif status in ErrorCode.UNKNOWN_ERROR:
- exception_class = WebDriverException
- elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
- exception_class = UnexpectedAlertPresentException
- elif status in ErrorCode.NO_ALERT_OPEN:
- exception_class = NoAlertPresentException
- elif status in ErrorCode.IME_NOT_AVAILABLE:
- exception_class = ImeNotAvailableException
- elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
- exception_class = ImeActivationFailedException
- elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
- exception_class = MoveTargetOutOfBoundsException
- else:
- exception_class = WebDriverException
- value = response['value']
- if isinstance(value, basestring):
- if exception_class == ErrorInResponseException:
- raise exception_class(response, value)
- raise exception_class(value)
- message = ''
- if 'message' in value:
- message = value['message']
- screen = None
- if 'screen' in value:
- screen = value['screen']
- stacktrace = None
- if 'stackTrace' in value and value['stackTrace']:
- stacktrace = []
- try:
- for frame in value['stackTrace']:
- line = self._value_or_default(frame, 'lineNumber', '')
- file = self._value_or_default(frame, 'fileName', '<anonymous>')
- if line:
- file = "%s:%s" % (file, line)
- meth = self._value_or_default(frame, 'methodName', '<anonymous>')
- if 'className' in frame:
- meth = "%s.%s" % (frame['className'], meth)
- msg = " at %s (%s)"
- msg = msg % (meth, file)
- stacktrace.append(msg)
- except TypeError:
- pass
- if exception_class == ErrorInResponseException:
- raise exception_class(response, message)
- elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
- raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
- > raise exception_class(message, screen, stacktrace)
- E NoSuchElementException: Message: Unable to locate element: {"method":"id","selector":"breadcrumbs"}
- E For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
- E Build info: version: '2.43.0', revision: '597b76b', time: '2014-09-09 20:52:14'
- E System info: host: 'WIN-R1JBAO1CNPS', ip: '172.20.43.124', os.name: 'Windows Server 2008 R2', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_60'
- E Driver info: driver.version: unknown
- E Stacktrace:
- E at <anonymous class>.FirefoxDriver.prototype.findElementInternal_ (file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous5100687929099589452webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:9618:133)
- E at <anonymous class>.fxdriver.Timer.prototype.setTimeout/<.notify (file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous5100687929099589452webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:548:5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement