Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test passing with Chrome, but failing with Firefox #7

Open
jhutar opened this issue Feb 6, 2018 · 2 comments
Open

test passing with Chrome, but failing with Firefox #7

jhutar opened this issue Feb 6, 2018 · 2 comments
Labels
bug Something isn't working low

Comments

@jhutar
Copy link
Collaborator

jhutar commented Feb 6, 2018

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
Copy link
Collaborator Author

jhutar commented Feb 6, 2018

Full error is in ff.txt

@oshtaier
Copy link
Collaborator

oshtaier commented Feb 6, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low
Projects
None yet
Development

No branches or pull requests

3 participants