org.openqa.selenium.iphone
Class IPhoneDriver
java.lang.Object
org.openqa.selenium.remote.RemoteWebDriver
org.openqa.selenium.iphone.IPhoneDriver
- All Implemented Interfaces:
- HasCapabilities, HasInputDevices, FindsByClassName, FindsByCssSelector, FindsById, FindsByLinkText, FindsByName, FindsByTagName, FindsByXPath, JavascriptExecutor, SearchContext, TakesScreenshot, WebDriver
- Direct Known Subclasses:
- IPhoneSimulatorDriver
public class IPhoneDriver
- extends RemoteWebDriver
- implements TakesScreenshot
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.
|
Constructor Summary |
IPhoneDriver()
Create an IPhoneDriver connected to an iphone simulator running on the
local machine. |
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. |
| 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, getKeyboard, getMouse, getPageSource, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, newRemoteWebElement, quit, setCommandExecutor, setElementConverter, startClient, startSession, stopClient |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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
close
public void close()
- Specified by:
close in interface WebDriver- Overrides:
close in class RemoteWebDriver
switchTo
public WebDriver.TargetLocator switchTo()
- Specified by:
switchTo in interface WebDriver- Overrides:
switchTo in class RemoteWebDriver
getScreenshotAs
public <X> X getScreenshotAs(OutputType<X> target)
- Specified by:
getScreenshotAs in interface TakesScreenshot
Copyright © 2011. All Rights Reserved.