Skip to content

Add Get Selenium Session Id -keyword #191

Closed

Description

@datakurre

Selenium session id is required for sending test status information back to Sauce Labs, but it's currently not exposed through keywords. Because I want to use the released S2L, I need to monkey patch it to get the id:

https://github.com/plone/plone.app.robotframework/blob/master/src/plone/app/robotframework/saucelabs.py#L16

Would it be OK to add a such keyword? I could also provide pull request later myself.

Activity

  1. j1z0 commented on Apr 10, 2013

    @j1z0
    Contributor

    would be great if you could provide a path Asko. I would incorporate it.

    Cheers,
    Jeremy

    On Apr 10, 2013, at 2:17 PM, Asko Soukka wrote:

    Selenium session id is required for sending test status information back to Sauce Labs, but it's currently not exposed through keywords. Because I want to use the released S2L, I need to monkey patch it to get the id:

    https://github.com/plone/plone.app.robotframework/blob/master/src/plone/app/robotframework/saucelabs.py#L16

    Would it be OK to add a such keyword? I could also provide pull request later myself.

    —
    Reply to this email directly or view it on GitHub.

  2. datakurre commented on Apr 10, 2013

    @datakurre
    Author

    Thanks. I'll prepare a pull request for this later and close this issue when the pull is there (need to write documentation for the keyword).

  3. ombre42 commented on Apr 10, 2013

    @ombre42
    Contributor

    I think this keyword is a good idea, however I would like to point out that monkey patching is not needed in this scenario. I used code like this to get the IP of the node when using Grid.:

    from robot.libraries.BuiltIn import BuiltIn
    
    def do_something():
        session_id = BuiltIn().get_library_instance('Selenium2Library')._current_browser().session_id
       ...
    
  4. datakurre commented on Apr 10, 2013

    @datakurre
    Author

    @ombre42 Thanks. I was unaware of that possibility.

    (I will still try to make a pull request later.)

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