Skip to content

Add fix from SeleniumLibrary issue 220  #70

Closed

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)

Activity

  1. hbmartin commented on Jul 20, 2012

    @hbmartin

    Can you give a test case/code demonstrating this issue?

    This seems to work fine for me:

    *** Settings ***
    Library     Selenium2Library
    
    *** Test Cases ***
    
    Check for Teardown after bad URL      
        Set_Log_Level          DEBUG
        Open Browser  http://iamnotarealwebsite.lol firefox
        [Teardown]  Close Browser
    
  2. elizaleong commented on Jul 20, 2012

    @elizaleong
    Author

    Problem was specific with chromedriver and ie driver. Firefox worked fine.

    You can also look in google group selenium-user,
    https://groups.google.com/forum/?hl=en&fromgroups#!searchin/selenium-users/os.kill

    Please let me know if you need more information than this. Thanks for the
    support!

    On Fri, Jul 20, 2012 at 11:01 AM, hbmartin <
    reply@reply.github.com

    wrote:

    Can you give a test case/code demonstrating this issue?

    This seems to work fine for me:

    *** Settings ***
    Library         Selenium2Library
    
    *** Test Cases ***
    
    Check for Teardown after bad URL
        Set_Log_Level          DEBUG
        Open Browser  http://iamnotarealwebsite.lol firefox
        [Teardown]  Close Browser
    

    Reply to this email directly or view it on GitHub:

    #70 (comment)

    Eliza Leong | QA
    *
    Kiva http://www.kiva.org/ – Loans that Change Lives
    Join us on Twitter http://twitter.com/#%21/kiva,
    Facebookhttps://www.facebook.com/kiva
    and LinkedIn http://www.linkedin.com/groups/KIVA-2606?home=&gid=2606!
    *
    875 Howard Street, Suite #340, San Francisco, CA 94103

  3. ghost assigned on Jan 9, 2014
  4. emanlove commented on Jan 24, 2014

    @emanlove
    Member

    Fixed in #263.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions