Android and iPhone, iPad testing with JSONWireProtocol?

233 views
Skip to first unread message

David

unread,
Dec 28, 2011, 4:54:58 PM12/28/11
to webdriver
Just wondering if anyone has tried using JSONWireProtocol with iPhone,
iPad, and Android. It looks like mobile device testing is mostly with
Java, but WebDriver at its core is JSONWireProtocol, so I assume there
would be some support for them in the protocol.

I notice the protocol allows for browserName value of iphone for the
capabilities JSON object and it has protocol commands for touch
actions, so looks like there is some support for iPhone. Is iPad (if
supported), the same as using iPhone support?

And what of Android?

Would be nice to put together some wiki docs on how to do all this, or
what is currently possible, with JSONWireProtocol, so that others can
try to use mobile drivers outside of Java, using the protocol as the
reference point.

Luke Inman-Semerau

unread,
Dec 28, 2011, 5:27:00 PM12/28/11
to webd...@googlegroups.com
It's the same as running any Remote Web Driver. So, the same way you would connect to a browser you can do that for iPhone/iPad and Android.


Only Android (I think) supports the touch wireprotocols.

(As it seems you already know of this one) -

So, what language are you using / want to use to drive the browsers?


--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.


Jim Evans

unread,
Dec 28, 2011, 5:30:57 PM12/28/11
to webdriver
Java is not the only language capable of running against mobile
browsers. The .NET bindings, for example, have a dedicated
AndroidDriver. I'm also quite sure there are people who have run tests
on the iPhone using C# (hi, Luke!).

As with all of the drivers that use the wire protocol, if you have the
server component that acts as an HTTP server that understands the
protocol, all you need do is use your language binding's equivalent of
RemoteWebDriver, and it should work. For Android, the server component
takes the form of an Android application. Similarly, for iOS devices,
there is an application that you can install[1] acting as a server to
which your client code can connect.

I've oversimplified things here a bit, but the gist of the situation
should be clear. I'm sure one of the other, more involved committers
will speak up if I've got it wrong.

--Jim

[1] My understanding is that the apps you need here can be added to
the device only through the Xcode development environment under a
provisioning profile. I don't mean to imply you can go to the iPhone
or Android app store and simply install the server application.

David

unread,
Dec 28, 2011, 7:34:45 PM12/28/11
to webdriver
Thanks I'll investigate more when I have a mobile development
environment ready. There are plans at my workplace within the next
year.

We'll probably be using Java, but I wanted to keep my options open and
like using the JSONWireProtocol (with PHP thus far).

I was asking about this in particular because wasn't sure if there are
specifics for Android and iPhone such as special parameters during
connect phase, which are different from standard browsers for
JSONWireProtocol, or what is not yet documented in that regards. For
example, had to look over multiple places to learn that you can
specify Firefox profile (as base64 encoded zip file of the profile
directory) using desired capabilities parameter name of
"firefox_profile" and pass in that data. The JSONWireProtocol wiki
itself doesn't describe the available desired capabilities parameters
(and you have to dig deeper elsewhere for them).

Simon Stewart

unread,
Dec 29, 2011, 5:51:50 AM12/29/11
to webd...@googlegroups.com
A lot of the options are specific to a particular browser, and not shared by all implementations. The json wire protocol is really only meant to document the global pieces.

We do try and list the browser specific magic on the wiki page for each browser. I guess we should move that information up onto seleniumhq at some point.

Simon

David

unread,
Feb 7, 2012, 7:54:35 PM2/7/12
to webdriver
Posting an update. Just tried out Android emulator with WebDriver
server. Tried it with the Java AndroidDriver and also tried in PHP
using the JSONWireProtocol.

Documented how to connect and do very simple commands with it here:

https://github.com/facebook/php-webdriver/wiki/Working-with-mobile-devices

On Dec 29 2011, 2:51 am, Simon Stewart <simon.m.stew...@gmail.com>
wrote:

Jonah Stiennon

unread,
Mar 14, 2014, 6:49:59 PM3/14/14
to webd...@googlegroups.com
Update:
The Appium project is set up to use JSONWireProtocol with additional commands added for mobile. There's a JSONWireProtocol Mobile spec currently being developed.
Reply all
Reply to author
Forward
0 new messages