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

Add Get Selenium Session Id -keyword #191

Closed
datakurre opened this issue Apr 10, 2013 · 4 comments
Closed

Add Get Selenium Session Id -keyword #191

datakurre opened this issue Apr 10, 2013 · 4 comments

Comments

@datakurre
Copy link

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.

@j1z0
Copy link
Contributor

j1z0 commented Apr 10, 2013

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.

@datakurre
Copy link
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).

@ombre42
Copy link
Contributor

ombre42 commented Apr 10, 2013

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
   ...

@datakurre
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants