org.jboss.test.selenium.request
Class RequestInterceptor

java.lang.Object
  extended by org.jboss.test.selenium.request.RequestInterceptor

public class RequestInterceptor
extends Object

Java API for interception of HTTP/XMLHttpRequest requests.

Needs to have PageExtensions installed in the current page using PageExtensions#install().

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
RequestInterceptor()
           
 
Method Summary
 RequestType clearRequestTypeDone()
           Clears the request type indicated on the page, gives possibility to intercept subsequent requests.
 RequestType getRequestTypeDone()
          Obtains the done requestType from page.
 void waitForRequestTypeChange()
          Waits for change of RequestType indicated on the page from NONE to other value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestInterceptor

public RequestInterceptor()
Method Detail

getRequestTypeDone

public RequestType getRequestTypeDone()
Obtains the done requestType from page.

Returns:
the RequestType what was done
Throws:
IllegalStateException - when the unknown type of request was obtained

clearRequestTypeDone

public RequestType clearRequestTypeDone()

Clears the request type indicated on the page, gives possibility to intercept subsequent requests.

Returns the last RequestType set.

Returns:
the last RequestType done
Throws:
IllegalStateException - when the unknown type of request was obtained

waitForRequestTypeChange

public void waitForRequestTypeChange()
Waits for change of RequestType indicated on the page from NONE to other value.



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