abalakh / airgun

Airgun moved to https://github.com/SatelliteQE/airgun
https://github.com/SatelliteQE/airgun
1 stars 2 forks source link

test passing with Chrome, but failing with Firefox #7

Open jhutar opened 6 years ago

jhutar commented 6 years ago

Following README.rst, when you run pytest tests/foreman/ui_airgun/test_architecture.py with this setup it works:

$ grep ^webdriver robottelo.properties
webdriver=chrome
webdriver_binary=venv/bin/chromedriver
$ pytest tests/foreman/ui_airgun/test_architecture.py 
=== test session starts ===
platform linux -- Python 3.6.4, pytest-3.3.2, py-1.5.2, pluggy-0.6.0
shared_function enabled - OFF - scope:  - storage: file
rootdir: /home/pok/Checkouts/robottelo, inifile:
plugins: wait-for-1.0.9, services-1.2.1, mock-1.6.3
collected 2 items                                                                                                                                                                                                                            
2018-02-06 13:23:21 - conftest - DEBUG - BZ deselect is disabled in settings

tests/foreman/ui_airgun/test_architecture.py ..                                                                                                                                                                                        [100%]

=== 2 passed in 84.81 seconds ===

But when I run the same on Firefox (firefox-58.0-4.fc27.x86_64, geckodriver-v0.19.1-linux64.tar.gz), it fails:

$ grep ^webdriver robottelo.properties
webdriver=firefox
webdriver_binary=venv/bin/geckodriver

Error is:

self = <airgun.browser.AirgunBrowser object at 0x7f90a97e2d68>, locator = Locator(by='xpath', locator="//a[contains(@href, '/architectures/new')]"), args = (), kwargs = {}, vcheck = None, elements = []

    def element(self, locator, *args, **kwargs):
        """Returns one :py:class:`selenium.webdriver.remote.webelement.WebElement`

            See: :py:meth:`elements`

            Returns:
                :py:class:`selenium.webdriver.remote.webelement.WebElement`

            Raises:
                :py:class:`selenium.common.exceptions.NoSuchElementException`
            """
        try:
            vcheck = self._locator_force_visibility_check(locator)
            if vcheck is not None:
                kwargs['check_visibility'] = vcheck
            elements = self.elements(locator, *args, **kwargs)
            if len(elements) > 1:
                visible_elements = [e for e in elements if self.is_displayed(e)]
                if visible_elements:
                    return visible_elements[0]
                else:
                    return elements[0]
            else:
>               return elements[0]
E               IndexError: list index out of range

venv/lib/python3.6/site-packages/widgetastic/browser.py:337: IndexError
[...]
jhutar commented 6 years ago

Full error is in ff.txt

oshtaier commented 6 years ago

treat as low priority as we are going to support one browser first