com.atlassian.confluence.pageobjects.module.frame
Class ConfluenceFrameExecutorTemplate

java.lang.Object
  extended by com.atlassian.confluence.pageobjects.module.frame.ConfluenceFrameExecutorTemplate
All Implemented Interfaces:
ConfluenceFrameExecutor
Direct Known Subclasses:
ConfluenceFrameExecutorTemplate.Lenient, ConfluenceFrameExecutorTemplate.Strict

public abstract class ConfluenceFrameExecutorTemplate
extends java.lang.Object
implements ConfluenceFrameExecutor


Nested Class Summary
static class ConfluenceFrameExecutorTemplate.Lenient
          Tries to switch to the given frame before running the closure but does not escape if not possible.
static class ConfluenceFrameExecutorTemplate.Strict
          Switches to the given frame before running the closure and escapes if not possible.
 
Constructor Summary
ConfluenceFrameExecutorTemplate()
           
 
Method Summary
protected abstract  void handleNoSuchFrameException(org.openqa.selenium.NoSuchFrameException exception)
           
<T> T
onTinyMceIFrame(java.util.concurrent.Callable<T> callback)
          Switches the driver to the TinyMCE IFrame if necessary and executes the given callback.
<T> com.atlassian.pageobjects.elements.query.TimedQuery<T>
queryOnIFrame(java.lang.String iFrameId, java.util.concurrent.Callable<T> callback)
          Switches the driver to a named IFrame to execute a query.
<T> com.atlassian.pageobjects.elements.query.TimedQuery<T>
queryOnTinyMceIFrame(java.util.concurrent.Callable<T> callback)
          Allows repeated switching the driver to the TinyMCE IFrame if necessary to execute a query.
protected  void switchToDefaultFrame()
           
protected  void switchToFrame(java.lang.String frameNameOrId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfluenceFrameExecutorTemplate

public ConfluenceFrameExecutorTemplate()
Method Detail

onTinyMceIFrame

public <T> T onTinyMceIFrame(java.util.concurrent.Callable<T> callback)
Description copied from interface: ConfluenceFrameExecutor
Switches the driver to the TinyMCE IFrame if necessary and executes the given callback.

Specified by:
onTinyMceIFrame in interface ConfluenceFrameExecutor
Parameters:
callback - the callback to be executed
Returns:
the result of the callback

queryOnTinyMceIFrame

public <T> com.atlassian.pageobjects.elements.query.TimedQuery<T> queryOnTinyMceIFrame(java.util.concurrent.Callable<T> callback)
Description copied from interface: ConfluenceFrameExecutor
Allows repeated switching the driver to the TinyMCE IFrame if necessary to execute a query.

Specified by:
queryOnTinyMceIFrame in interface ConfluenceFrameExecutor
Parameters:
callback - the callback to be executed
Returns:
a TimedQuery to execute the callback query

queryOnIFrame

public <T> com.atlassian.pageobjects.elements.query.TimedQuery<T> queryOnIFrame(java.lang.String iFrameId,
                                                                                java.util.concurrent.Callable<T> callback)
Description copied from interface: ConfluenceFrameExecutor
Switches the driver to a named IFrame to execute a query.

Specified by:
queryOnIFrame in interface ConfluenceFrameExecutor
callback - the callback to be executed
Returns:
a TimedQuery to execute the callback query

switchToDefaultFrame

protected void switchToDefaultFrame()

switchToFrame

protected void switchToFrame(java.lang.String frameNameOrId)

handleNoSuchFrameException

protected abstract void handleNoSuchFrameException(org.openqa.selenium.NoSuchFrameException exception)


Copyright © 2003-2014 Atlassian. All Rights Reserved.