Skip to content

Open_Browser keyword raises exception and webdriver not being disposed #304

Closed

Description

@blinkins0n

Running robotframework-selenium2library on Windows 2008, I was getting timeout in the browser.get(url) below when invoking chromedriver.exe. Suggest wrapping the call with try catch browser.quit() invocation.

_browsermanagement.py

def open_browser(self, url, browser='firefox', alias=None,remote_url=False,
            desired_capabilities=None,ff_profile_dir=None):
    """
    """
    ..................
    try:
        browser.get(url)
        self._debug('Opened browser with session id %s'
                   % browser.session_id)
        return self._cache.register(browser, alias)
    except:
        print 'BrowserManagement: exception. Could not load the page. Browser and    service will be stopped...'
        browser.quit()        
        raise RuntimeError("BrowserManagement: exception. Could not load the page.")

Activity

  1. lawred2 commented on Jul 28, 2014

    @lawred2

    Excellent... I was having an issue where the chromedriver process was not being unloaded and remained orphaned at the end of a test. I think this could have possibly been the root cause. I'll make this change locally and will see if it makes a difference.

  2. blinkins0n commented on Jul 28, 2014

    @blinkins0n
    Author

    Hi lawred2,

    I just realized that bug fix may have been released in the merge below:
    9e16282

    Regards.

  3. ombre42 commented on Aug 29, 2014

    @ombre42
    Contributor

    Thank you for reporting this. Closing as duplicate of #70, which was fixed in PR #263 for 1.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions