Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add fix from SeleniumLibrary issue 220  #70

@elizaleong

Description

@elizaleong

There was a bug against SeleniumLibrary 2.8 which is also present in robotframework-selenium2library
I'm wondering if you could incorporate the fix here as it causes Close All Browsers to fail for Suite Teardown.

The problem is here: http://code.google.com/p/robotframework-seleniumlibrary/issues/detail?id=220#c3

From what I read the same change could be applied to keywords/_browsermanagement.py's open_browser function.

From SeleniumLibrary's _browser.py:

   try:
       self._selenium.open(url, ignoreResponseCode=True)
       self._debug('Opened browser with Selenium session id %s'
                    % self._selenium.sessionId)
   except:
       self._cache.register(self._selenium, alias)
       raise RuntimeError("Open browser failed")
    return self._cache.register(self._selenium, alias)

From Selenium2Library (which also needs to catch browser creation failures and register regardless):

    browser = self._make_browser(browser_name,desired_capabilities,ff_profile_dir,remote_url)
    browser.get(url)
    self._debug('Opened browser with session id %s'
                % browser.session_id)
    return self._cache.register(browser, alias)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions