Looking for sample Java code making a JSON Wire Protocol call

37 views
Skip to first unread message

Mark Tyler

unread,
Oct 14, 2015, 11:11:35 PM10/14/15
to Selenium Users
For example, I would like to try sending the following command to maximize a window managed by a RemoteWebDriver:
POST /session/:sessionId/window/:windowHandle/maximize

Krishnan Mahadevan

unread,
Oct 14, 2015, 11:25:53 PM10/14/15
to seleniu...@googlegroups.com
Mark,

You can take a look at this link http://www.mkyong.com/webservices/jax-rs/restful-java-client-with-apache-httpclient/ to learn how to POST a JSON Message to an end-point.
The session ID can be obtained from the RemoteWebDriver instance [org.openqa.selenium.remote.RemoteWebDriver#getSessionId] and you should be able to achieve what you are looking for.


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/

On 15-Oct-2015, at 3:46 am, Mark Tyler <mrt...@gmail.com> wrote:

For example, I would like to try sending the following command to maximize a window managed by a RemoteWebDriver:
POST /session/:sessionId/window/:windowHandle/maximize

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/e081e39e-1dc6-4e8b-bf58-60bf300447f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages