org.openqa.selenium
Class XlatorTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.openqa.selenium.XlatorTask
All Implemented Interfaces:
java.lang.Cloneable

public class XlatorTask
extends org.apache.tools.ant.Task

Provides an Ant task to run the Selenium Translator, which translates HTML Selenese into other programming languages.

Parameters

Attribute Description Required
destDir Location to write the translated files Yes
baseUrl The baseUrl to use for testing Yes
formatter Formatter to use; currently supported formatters are "java-rc", "cs-rc", "perl-rc", "python-rc", and "ruby-rc". Yes

Parameters as Nested Elements

fileset

A fileset of HTML Selenese files to translate

option

An option to pass to the translator, in the form <option name="foo" value="bar" />

mapper

A mapper of files to output files. The default mapper is a glob mapper from *.html to the appropriate extension for the specified formatter (.java, .cs, .pl, etc.).

Author:
danielf

Nested Class Summary
static class XlatorTask.FormatterType
           
 
Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
XlatorTask()
           
 
Method Summary
 void addConfiguredOption(org.apache.tools.ant.taskdefs.Property p)
           
 void addFileSet(org.apache.tools.ant.types.FileSet fs)
           
 org.apache.tools.ant.types.Mapper createMapper()
          Defines the mapper to map source to destination files.
 void execute()
           
 void setBaseUrl(java.net.URL baseUrl)
           
 void setDestDir(java.io.File destDir)
          Specifies a destination directory for translated output
 void setFormatter(XlatorTask.FormatterType formatter)
           
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XlatorTask

public XlatorTask()
Method Detail

setDestDir

public void setDestDir(java.io.File destDir)
Specifies a destination directory for translated output


setFormatter

public void setFormatter(XlatorTask.FormatterType formatter)

setBaseUrl

public void setBaseUrl(java.net.URL baseUrl)

addFileSet

public void addFileSet(org.apache.tools.ant.types.FileSet fs)

addConfiguredOption

public void addConfiguredOption(org.apache.tools.ant.taskdefs.Property p)

createMapper

public org.apache.tools.ant.types.Mapper createMapper()
                                               throws org.apache.tools.ant.BuildException
Defines the mapper to map source to destination files.

Returns:
a mapper to be configured
Throws:
org.apache.tools.ant.BuildException - if more than one mapper is defined

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException


Copyright © 2011. All Rights Reserved.