org.openqa.selenium.iphone
Class IPhoneDriver

java.lang.Object
  extended by org.openqa.selenium.remote.RemoteWebDriver
      extended by org.openqa.selenium.iphone.IPhoneDriver
All Implemented Interfaces:
org.openqa.selenium.HasCapabilities, org.openqa.selenium.HasInputDevices, org.openqa.selenium.html5.WebStorage, org.openqa.selenium.internal.FindsByClassName, org.openqa.selenium.internal.FindsByCssSelector, org.openqa.selenium.internal.FindsById, org.openqa.selenium.internal.FindsByLinkText, org.openqa.selenium.internal.FindsByName, org.openqa.selenium.internal.FindsByTagName, org.openqa.selenium.internal.FindsByXPath, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.SearchContext, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.WebDriver
Direct Known Subclasses:
IPhoneSimulatorDriver

public class IPhoneDriver
extends RemoteWebDriver
implements org.openqa.selenium.TakesScreenshot, org.openqa.selenium.html5.WebStorage

IPhoneDriver is a driver for running tests on Mobile Safari on the iPhone, iPad and iPod Touch. The driver uses WebDriver's remote REST interface to communicate with the iphone. The iphone (or iphone simulator) must be running the iWebDriver app.


Nested Class Summary
static class IPhoneDriver.STORAGE_TYPE
           
 
Nested classes/interfaces inherited from class org.openqa.selenium.remote.RemoteWebDriver
RemoteWebDriver.RemoteTargetLocator, RemoteWebDriver.RemoteWebDriverOptions, RemoteWebDriver.When
 
Nested classes/interfaces inherited from interface org.openqa.selenium.WebDriver
org.openqa.selenium.WebDriver.ImeHandler, org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window
 
Field Summary
protected static String DEFAULT_IWEBDRIVER_URL
          This is the default port and URL for iWebDriver.
 
Constructor Summary
IPhoneDriver()
          Create an IPhoneDriver connected to an iphone simulator running on the local machine.
IPhoneDriver(org.openqa.selenium.Capabilities ignored)
           
IPhoneDriver(CommandExecutor executor)
          Create an IPhoneDriver that will use the given executor to communicate with the iWebDriver app.
IPhoneDriver(String remoteAddress)
          Create an IPhoneDriver connected to the remote address passed in.
IPhoneDriver(URL remoteAddress)
          Create an IPhoneDriver connected to the remote address passed in.
 
Method Summary
 void close()
           
 org.openqa.selenium.html5.LocalStorage getLocalStorage()
           
<X> X
getScreenshotAs(org.openqa.selenium.OutputType<X> target)
           
 org.openqa.selenium.html5.SessionStorage getSessionStorage()
           
 void setFileDetector(FileDetector detector)
           
 org.openqa.selenium.WebDriver.TargetLocator switchTo()
           
 
Methods inherited from class org.openqa.selenium.remote.RemoteWebDriver
execute, execute, executeAsyncScript, executeScript, findElement, findElement, findElementByClassName, findElementByCssSelector, findElementById, findElementByLinkText, findElementByName, findElementByPartialLinkText, findElementByTagName, findElementByXPath, findElements, findElements, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, get, getCapabilities, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getExecuteMethod, getFileDetector, getKeyboard, getMouse, getPageSource, getRemoteStatus, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, quit, setCommandExecutor, setElementConverter, setFoundBy, setLogLevel, setSessionId, startClient, startSession, startSession, stopClient, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_IWEBDRIVER_URL

protected static final String DEFAULT_IWEBDRIVER_URL
This is the default port and URL for iWebDriver. Eventually it would be nice to use DNS-SD to detect iWebDriver instances running non locally or on non-default ports.

See Also:
Constant Field Values
Constructor Detail

IPhoneDriver

public IPhoneDriver(CommandExecutor executor)
Create an IPhoneDriver that will use the given executor to communicate with the iWebDriver app.

Parameters:
executor - The executor to use for communicating with the iPhone.

IPhoneDriver

public IPhoneDriver(URL remoteAddress)
             throws Exception
Create an IPhoneDriver connected to the remote address passed in.

Parameters:
remoteAddress - The full URL of the remote client (device or simulator).
Throws:
Exception
See Also:
IPhoneDriver(String)

IPhoneDriver

public IPhoneDriver(String remoteAddress)
             throws Exception
Create an IPhoneDriver connected to the remote address passed in.

Parameters:
remoteAddress - The full URL of the remote client running iWebDriver.
Throws:
Exception
See Also:
IPhoneDriver(URL)

IPhoneDriver

public IPhoneDriver()
             throws Exception
Create an IPhoneDriver connected to an iphone simulator running on the local machine.

Throws:
Exception

IPhoneDriver

public IPhoneDriver(org.openqa.selenium.Capabilities ignored)
             throws Exception
Throws:
Exception
Method Detail

setFileDetector

public void setFileDetector(FileDetector detector)
Overrides:
setFileDetector in class RemoteWebDriver

close

public void close()
Specified by:
close in interface org.openqa.selenium.WebDriver
Overrides:
close in class RemoteWebDriver

switchTo

public org.openqa.selenium.WebDriver.TargetLocator switchTo()
Specified by:
switchTo in interface org.openqa.selenium.WebDriver
Overrides:
switchTo in class RemoteWebDriver

getScreenshotAs

public <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> target)
Specified by:
getScreenshotAs in interface org.openqa.selenium.TakesScreenshot

getLocalStorage

public org.openqa.selenium.html5.LocalStorage getLocalStorage()
Specified by:
getLocalStorage in interface org.openqa.selenium.html5.WebStorage

getSessionStorage

public org.openqa.selenium.html5.SessionStorage getSessionStorage()
Specified by:
getSessionStorage in interface org.openqa.selenium.html5.WebStorage


Copyright © 2013. All Rights Reserved.