org.jbehave.web.selenium
Class FlashDriver

java.lang.Object
  extended by org.jbehave.web.selenium.FlashDriver
All Implemented Interfaces:
org.openqa.selenium.SearchContext, org.openqa.selenium.WebDriver

public class FlashDriver
extends java.lang.Object
implements org.openqa.selenium.WebDriver

A WebDriver decorator that allows interaction with a Flash object via Javascript calls. The WebDriver must be an instance of JavascriptExecutor.

The Flash object is found via the object ID provided.


Nested Class Summary
static class FlashDriver.JavascriptNotSupported
           
 
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
 
Field Summary
protected  org.openqa.selenium.WebDriver delegate
           
protected  java.lang.String flashObjectId
           
 
Constructor Summary
FlashDriver(org.openqa.selenium.WebDriver delegate, java.lang.String flashObjectId)
           
 
Method Summary
 java.lang.Object call(java.lang.String functionName, java.lang.String... args)
           
 void click()
           
 void close()
           
 org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
           
 java.util.List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
           
protected  org.openqa.selenium.WebElement findFlashObject(java.lang.String flashObjectId)
           
protected  java.lang.String formatJavascript(java.lang.String functionName, java.lang.String... args)
           
 void get(java.lang.String s)
           
 java.lang.String getCurrentUrl()
           
 java.lang.String getPageSource()
           
 java.lang.String getTitle()
           
 java.lang.String getWindowHandle()
           
 java.util.Set<java.lang.String> getWindowHandles()
           
 org.openqa.selenium.WebDriver.Options manage()
           
 org.openqa.selenium.WebDriver.Navigation navigate()
           
 int percentLoaded()
           
 void quit()
           
 org.openqa.selenium.WebDriver.TargetLocator switchTo()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

protected org.openqa.selenium.WebDriver delegate

flashObjectId

protected java.lang.String flashObjectId
Constructor Detail

FlashDriver

public FlashDriver(org.openqa.selenium.WebDriver delegate,
                   java.lang.String flashObjectId)
Method Detail

call

public java.lang.Object call(java.lang.String functionName,
                             java.lang.String... args)

findFlashObject

protected org.openqa.selenium.WebElement findFlashObject(java.lang.String flashObjectId)

formatJavascript

protected java.lang.String formatJavascript(java.lang.String functionName,
                                            java.lang.String... args)

click

public void click()

percentLoaded

public int percentLoaded()

get

public void get(java.lang.String s)
Specified by:
get in interface org.openqa.selenium.WebDriver

getCurrentUrl

public java.lang.String getCurrentUrl()
Specified by:
getCurrentUrl in interface org.openqa.selenium.WebDriver

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface org.openqa.selenium.WebDriver

findElements

public java.util.List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
Specified by:
findElements in interface org.openqa.selenium.SearchContext
Specified by:
findElements in interface org.openqa.selenium.WebDriver

findElement

public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
Specified by:
findElement in interface org.openqa.selenium.SearchContext
Specified by:
findElement in interface org.openqa.selenium.WebDriver

getPageSource

public java.lang.String getPageSource()
Specified by:
getPageSource in interface org.openqa.selenium.WebDriver

close

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

quit

public void quit()
Specified by:
quit in interface org.openqa.selenium.WebDriver

getWindowHandles

public java.util.Set<java.lang.String> getWindowHandles()
Specified by:
getWindowHandles in interface org.openqa.selenium.WebDriver

getWindowHandle

public java.lang.String getWindowHandle()
Specified by:
getWindowHandle in interface org.openqa.selenium.WebDriver

switchTo

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

navigate

public org.openqa.selenium.WebDriver.Navigation navigate()
Specified by:
navigate in interface org.openqa.selenium.WebDriver

manage

public org.openqa.selenium.WebDriver.Options manage()
Specified by:
manage in interface org.openqa.selenium.WebDriver


Copyright © 2011. All Rights Reserved.