Package jp.vmi.selenium.selenese
Class TestCase
java.lang.Object
jp.vmi.selenium.selenese.TestCase
- All Implemented Interfaces:
IHtmlResultTestCase,IHtmlResultTestTarget,ITestCase,ITestTarget,Selenese
public class TestCase extends Object implements Selenese, ITestCase, IHtmlResultTestCase
test-case object for execution.
Supports Selenium IDE flow control plugin.
- See Also:
- A flow control plugin for Selenium IDE
-
Nested Class Summary
Nested classes/interfaces inherited from interface jp.vmi.selenium.selenese.Selenese
Selenese.Type -
Constructor Summary
Constructors Constructor Description TestCase() -
Method Summary
Modifier and Type Method Description voidaddCommand(Function<Integer,ICommand> cmdGenFunc)Add command to command list.voidaddCommand(ICommand command)Add command to command list.voidaddCommand(ICommandFactory commandFactory, String name, String... args)Add command to command list.Resultexecute(Selenese parent, Context context)Execute script.StringgetBaseName()Get test-target file base name.StringgetBaseURL()Get base URL in the test-case.CommandListgetCommandList()Get command list.StringgetFilename()Get filename of test-case.StringgetId()Get id.LogRecordergetLogRecorder()Get log recorder.StringgetName()Get test-target name.ResultgetResult()Get selenese result.CommandResultListgetResultList()Get test-case result list.SourceTypegetSourceType()Test-case source type.StopWatchgetStopWatch()Get stop watch.Selenese.TypegetType()Get script type.booleanhasNativeAlertHandler()True if this test-case has native alert handler command.TestCaseinitialize(SourceType sourceType, String filename, String name, String baseURL)Initialize after constructed.booleanisError()Is error instance?voidsetId(String id)Set test-case id.voidsetLogRecorder(LogRecorder logRecorder)Set log recorder.StringtoString()
-
Constructor Details
-
TestCase
public TestCase()
-
-
Method Details
-
initialize
Initialize after constructed.- Parameters:
sourceType- test-case source type.filename- selenese script filename. (This base name is used for generating screenshot file)name- test-case name.baseURL- effective base URL.- Returns:
- this.
-
getType
Description copied from interface:SeleneseGet script type.- Specified by:
getTypein interfaceIHtmlResultTestTarget- Specified by:
getTypein interfaceSelenese- Returns:
- script type.
-
getSourceType
Test-case source type.- Returns:
- source type.
-
isError
public boolean isError()Description copied from interface:ITestTargetIs error instance?- Specified by:
isErrorin interfaceITestTarget- Returns:
- true if this is error instance.
-
getFilename
Get filename of test-case.- Specified by:
getFilenamein interfaceIHtmlResultTestCase- Returns:
- filename.
-
getBaseName
Description copied from interface:ITestTargetGet test-target file base name. For example, return "def" when file name is "/abc/def.html".- Specified by:
getBaseNamein interfaceITestTarget- Returns:
- test-target file base name.
-
getName
Description copied from interface:ITestTargetGet test-target name.- Specified by:
getNamein interfaceIHtmlResultTestTarget- Specified by:
getNamein interfaceITestTarget- Returns:
- test-target name.
-
getId
Description copied from interface:SeleneseGet id. -
setId
Set test-case id.- Parameters:
id- test-case id.
-
getBaseURL
Get base URL in the test-case.- Returns:
- base URL.
-
getCommandList
Get command list.- Specified by:
getCommandListin interfaceIHtmlResultTestCase- Returns:
- command list.
-
getStopWatch
Get stop watch.- Specified by:
getStopWatchin interfaceITestTarget- Returns:
- stop watch.
-
setLogRecorder
Description copied from interface:ITestCaseSet log recorder.- Specified by:
setLogRecorderin interfaceITestCase- Parameters:
logRecorder- log recorder.
-
getLogRecorder
Description copied from interface:ITestCaseGet log recorder.- Specified by:
getLogRecorderin interfaceITestCase- Returns:
- log recorder.
-
getResult
Description copied from interface:SeleneseGet selenese result.- Specified by:
getResultin interfaceIHtmlResultTestTarget- Specified by:
getResultin interfaceSelenese- Returns:
- selenese result.
-
getResultList
Get test-case result list.- Specified by:
getResultListin interfaceIHtmlResultTestCase- Returns:
- test-case result list.
-
hasNativeAlertHandler
public boolean hasNativeAlertHandler()True if this test-case has native alert handler command.- Returns:
- true if this test-case has native alert handler command.
-
addCommand
Add command to command list.- Parameters:
command- command.
-
addCommand
Add command to command list.- Parameters:
cmdGenFunc- command generator function.
-
addCommand
Add command to command list.- Parameters:
commandFactory- command factory.name- command name.args- command arguments.
-
execute
Description copied from interface:SeleneseExecute script. -
toString
-