org.jboss.test.selenium.ajaxaware
Class AjaxAwareInterceptor

java.lang.Object
  extended by org.jboss.test.selenium.ajaxaware.AjaxAwareInterceptor
All Implemented Interfaces:
CommandInterceptor

public class AjaxAwareInterceptor
extends Object
implements CommandInterceptor

Class to use to extend functionality of command processors to catch Selenium exceptions and repeat the command for specific issue types (like Permission denied in Internet Explorer).

Version:
$Revision$
Author:
Lukas Fryc

Nested Class Summary
static class AjaxAwareInterceptor.PermissionDeniedException
          Thrown when the Selenium wasn't able in given interval to call the given command with no SeleniumException with type of Permission Denied catched.
 
Constructor Summary
AjaxAwareInterceptor()
           
 
Method Summary
 void intercept(CommandContext ctx)
           Executes the command wrapped in exception handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AjaxAwareInterceptor

public AjaxAwareInterceptor()
Method Detail

intercept

public void intercept(CommandContext ctx)
               throws CommandInterceptionException

Executes the command wrapped in exception handler.

Reacts to exceptions with 'Permission denied' type and try to reexecute the command in this situation.

Prints the exception stack trace to help identify the problematic commands.

Specified by:
intercept in interface CommandInterceptor
Parameters:
ctx - the current command context
Throws:
CommandInterceptionException - if the subsequent interceptor doesn't call CommandContext.invoke() in it's CommandInterceptor.intercept(CommandContext) method body.


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.