GET /session/:sessionId in W3C specification?

55 views
Skip to first unread message

Robbie Wareham

unread,
Sep 22, 2017, 4:18:54 AM9/22/17
to Selenium Developers
Hi,

The JSON Wire Protocol has a method that returns the details of session (https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionid), and have noticed that this is not in the W3C spec (https://www.w3.org/TR/webdriver/#sessions)

Is this by design? 

Thanks

Robbie

Jim Evans

unread,
Sep 22, 2017, 6:25:37 AM9/22/17
to Selenium Developers
Yes. The details are returned in the response for new session creation. If you think you’ll want them later, you should save them off somewhere. Most language bindings, though, do this for you, saving the returned capabilities in an object you can access in your code.

Robbie Wareham

unread,
Sep 22, 2017, 8:00:45 AM9/22/17
to Selenium Developers
Being able to access the session data in a stateless way at any point during the test and by any process can prove quite useful in my use case. Looks like I shall have to start passing the session object around rather than just the session id.

Thanks

Robbie

Jonathan Lipps

unread,
Sep 22, 2017, 6:26:59 PM9/22/17
to Selenium Developers
For what it's worth I also like `GET /session/:sessionid`, as a way for the client to retrieve status information about a particular session if necessary. This is not typically necessary for most cases but can be useful. Appium, for example, keeps track of timing data for various events in the lifecycle of a session. We felt the best semantics for retrieving this data was to call this endpoint. So it could potentially return different data over time. I know there are other ways to model this, including making a vendor-prefixed command endpoint. But it was nice that all the Selenium clients already supported `GET /session/:sessionid`.

⇜Krishnan Mahadevan⇝

unread,
Sep 23, 2017, 3:48:37 AM9/23/17
to Selenium Developers

Jonathan

::::Not intending to hijack this thread::::

>>>I know there are other ways to model this, including making a vendor-prefixed command endpoint. 

How would this work if the server component is vendor provided but the client bindings is still provided by core selenium ( say for eg geckodriver and FirefoxDriver Java client bindings).


--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/e2475469-8ca7-4e5d-bffa-194a1612f360%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

⇜Krishnan Mahadevan⇝

unread,
Sep 23, 2017, 6:49:24 AM9/23/17
to Selenium Developers

Please ignore my last question. I realised that the question doesn't make a lot of sense !

Simon Stewart

unread,
Sep 25, 2017, 11:14:15 AM9/25/17
to selenium-...@googlegroups.com
There’s a basic logging API in selenium already, and it’s one of the topics scheduled for discussion at TPAC. Those feel like a better place for this kind of information. 

The W3C process has been open for anyone to participate in: the repo with the spec in is on GH, and we review PRs pretty promptly (not right now as we’re waiting for the move from Proposed Recommendation) We’ll be opening Level 2 soon. This would be a great first PR :)

Simon

Sent from my iPhone
--

Robbie Wareham

unread,
Sep 26, 2017, 3:40:13 AM9/26/17
to Selenium Developers
 
Hi,
 
So are you saying that there will be an API resource to support this request but not using the  GET session/:sessionId route, and that the Logging part of the W3C standard has yet to be defined?

Also, apologies for the question, but what is TPAC?

Thanks

Robbie

Simon Stewart

unread,
Sep 26, 2017, 6:12:40 AM9/26/17
to selenium-developers
Hi,

There are already logging endpoints in the java bindings, chromedriver, and old Firefox driver, but they're widely considered less than ideal, and so have not been widely implemented. Their need is something that the W3C WebDriver working group discussed, but we didn't land any text in the spec in time for Level 1 (which should be finalised at the end of the month). So: yes, there are APIs, and yes, the as-yet-undefined-logging APIs from the spec will be the way forward.

TPAC is the the W3C's "Technical Plenary and Advisory Committee" meet up. It's where all the various groups working on W3C standards, and the steering committee of the W3C itself, all get together in various rooms and spend several days in face to face meetings. It is every bit as exciting as it sounds :) This year, it's happening in November in CA.

The WebDriver working group will be meeting at TPAC this year. Our agenda for the two days are here: https://www.w3.org/wiki/WebDriver/2017-TPAC-F2F

Cheers,

Simon

--
You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developers+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-developers/3f924043-5220-4c42-a59f-f0cc58f0bcf9%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages