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

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
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

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
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
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 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
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, 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)

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 © {inceptionYear}-2007 null. All Rights Reserved.