360 Logica

Selenium With iPhone – 360logica Exclusive

The iPhone driver allows testing on a UIWebView (a webkit browser accessible for 3rd party applications) on the iphone. It works through the use of an iphone application running on your iphone, ipod touch or iphone simulator.

Drawbacks
To test on a device you need the iphone SDK and a provisioning profile (for running on an actual device).

Building
From the checked-out copy, run: ./go iphone Which will build the iPhone driver and the application to be installed. It’s easier to start up the SDK manually and run it.

Installing
The iphone driver application is not currently on the Apple store. To run it, you will need the iphone development tools on your local machine. These tools must be downloaded from apple. To run it on your device, you will also need a provisioning profile.

The iphone driver connects through HTTP to the iphone, ipod or iphone simulator. You can run the simulator on another machine on your network and configure webdriver to connect to it remotely.

In the simulator
First, install the iphone SDK from here: http://developer.apple.com/iphone

Download the source from here and open webdriver/iphone/iWebDriver.xcodeproj in xcode. Set your build configuration to Simulator / iPhone OS 3.2 / iWebDriver. This is done in a drop-down box in the top left of the project window. Click Build & Go. After compiling, the iphone simulator should appear and the iWebDriver app will be installed in it.

On the device
For now, you will need the full set of development tools from apple to install on your device. Install the iphone SDK and configure your build environment as described above. You will also need a provisioning profile from Apple to be installed and configured for your device. Download and open the iWebdriver project as above. Open Info.plist and edit the Bundle Identifier to com.NAME.${PRODUCT_NAME:identifier} where NAME is the name you registered your provisioning profile to be an authority on.

Make sure your device is connected to your computer. Your device must also be routable from your computer. The easiest way to do this is to configure a wifi network and connect your device to it.

Set your build configuration to Device / iPhone OS 2.2 / iWebDriver and click Build & Go.

 
 

Back to Top