net.sf.jameleon.plugin.watij
Class WatijSessionTag

java.lang.Object
  extended by org.apache.commons.jelly.TagSupport
      extended by net.sf.jameleon.LocationAwareTagSupport
          extended by net.sf.jameleon.JameleonTagSupport
              extended by net.sf.jameleon.SessionTag
                  extended by net.sf.jameleon.plugin.watij.WatijSessionTag
All Implemented Interfaces:
Attributable, DataDrivableResultRecordable, FunctionResultRecordable, Storable, DynaTag, LocationAware, Tag

public class WatijSessionTag
extends SessionTag

A Session tag for the Watij plug-in. An example of its use might:


 <testcase xmlns="jelly:jameleon">
     <watij-session baseUrl="http://www.google.com" beginSession="true">
       <watij-assert-title
           functionId="Check that title is Google."
           title="Google"/>
     </watij-session>
 </testcase>
 

Tag Name: <watij-session>

Field Summary
protected  String baseUrl
           
protected  String beginAt
           
protected  IE currentIE
          A handle on the currently active IE
protected  IE session
          A handle on the Selenium server session
 
Fields inherited from class net.sf.jameleon.SessionTag
addt, application, beginSession, log, organization, postcondition, props, sessionDelay, sessionResults, tc
 
Fields inherited from class net.sf.jameleon.JameleonTagSupport
attributes, broker, contextVars, fp, unsupportedAttributes
 
Fields inherited from class net.sf.jameleon.LocationAwareTagSupport
columnNumber, elementTagName, lineNumber, scriptFileName
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
WatijSessionTag()
           
 
Method Summary
protected  void createSession()
           
 String getBaseUrl()
          Gets the base URL, including the protocol (http://), the domain name and any path informtion.
 String getBeginAt()
          Gets the trailing path of the URL to begin the browser at if set.
 IE getParentSession()
          Gets the Selenium session used to communicate with the web application
protected  String getRequestUrl()
          Gets the url to request
 IE getSession()
          Gets the Selenium session used to communicate with the web application
 void setCurrentIE(IE currentIE)
          Sets the current instance of IE to work with.
 void setUpSession()
           
 void startApplication()
          Loads the URL given by beginAt and baseUrl.
 void tearDownSession()
           
 
Methods inherited from class net.sf.jameleon.SessionTag
delaySession, doTag, findParentTestCase, getApplication, getOrganization, getSessionResult, getStoreToFileName, init, recordDataDrivableResult, recordFunctionResult, recordResult, removeChildlessResult, setOrganization, setSessionDelay, store, tearDown, trace, traceMsg
 
Methods inherited from class net.sf.jameleon.JameleonTagSupport
cleanVariablesInContext, createAttributes, describeAttributes, getAttributeBroker, getAttributes, getAttributeType, getClassAttributes, getFunctionalPoint, getUnsupportedAttributes, loadFunctionalPoint, resetFunctionalPoint, setAttribute, setVariableInContext, testForUnsupportedAttributesCaught
 
Methods inherited from class net.sf.jameleon.LocationAwareTagSupport
getColumnNumber, getElementName, getFileName, getLineNumber, setColumnNumber, setElementName, setFileName, setLineNumber
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.jelly.Tag
getBody, getContext, getParent, invokeBody, setBody, setContext, setParent
 

Field Detail

baseUrl

protected String baseUrl
This attribute is recognized by Jameleon
Context Name: baseUrl

beginAt

protected String beginAt
This attribute is recognized by Jameleon
Context Name: beginAt

session

protected IE session
A handle on the Selenium server session


currentIE

protected IE currentIE
A handle on the currently active IE

Constructor Detail

WatijSessionTag

public WatijSessionTag()
Method Detail

getBaseUrl

public String getBaseUrl()
Gets the base URL, including the protocol (http://), the domain name and any path informtion.

Returns:
the base URL.

getBeginAt

public String getBeginAt()
Gets the trailing path of the URL to begin the browser at if set.

Returns:
the trailing path of the URL to begin the browser at if set.

getRequestUrl

protected String getRequestUrl()
Gets the url to request

Returns:
The URL to use in startApplication.

getSession

public IE getSession()
Gets the Selenium session used to communicate with the web application

Returns:
Selenium

getParentSession

public IE getParentSession()
Gets the Selenium session used to communicate with the web application

Returns:
Selenium

createSession

protected void createSession()

setCurrentIE

public void setCurrentIE(IE currentIE)
Sets the current instance of IE to work with.


setUpSession

public void setUpSession()
Overrides:
setUpSession in class SessionTag

tearDownSession

public void tearDownSession()
Overrides:
tearDownSession in class SessionTag

startApplication

public void startApplication()
Loads the URL given by beginAt and baseUrl.

Overrides:
startApplication in class SessionTag


Copyright © 2006-2008 Christian Hargraves. All Rights Reserved.