[Webtest] Re: targetB depends on targetA. how to continue session from one target to another ?

Mike Danifo webtest@lists.canoo.com
Wed, 11 Jan 2006 07:08:53 -0500


Thanks Paul
Here is a small example of the script I am running
The login module is mylogin.xml, the core steps are in action.xml and
main.xml is the parent script which just calls mylogin and action
Webtest log is also below

<project name=3D"main" basedir=3D"." default=3D"main">

=09<property name=3D"webtest.home" value=3D"c:/java/webtest"/>
=09<property name=3D"webtest.script.home" value=3D"c:/dev/inc/2.0/test/webt=
est"/>

=09<import file=3D"${webtest.home}/lib/taskdef.xml"/>
=09<import file=3D"${webtest.script.home}/modules/mylogin.xml"/>
=09<import file=3D"${webtest.script.home}/modules/action.xml"/>

=09<target name=3D"main">
=09=09<login/>
=09=09<action/>
=09</target>

</project>

<project name=3D"mylogin">
=09<macrodef name=3D"login">

=09=09<attribute name=3D"login.name" default=3D"incadmin"/>
=09=09<attribute name=3D"login.password" default=3D"incadmin"/>

=09=09<sequential>
=09=09=09<webtest name=3D"login">
=09=09=09=09 <config
=09=09=09=09=09  host=3D"mssql1.sw.ins.com"
=09=09=09=09=09  port=3D"8080"
=09=09=09=09=09  basepath=3D"incontrol"/>
=09=09=09=09<steps>
=09=09=09=09=09<invoke description=3D"goto start page" url=3D"logon.action"=
 />
                    <setInputField description=3D"set user name"
name=3D"username" value=3D"@{login.name}" />
=09=09=09=09=09<setInputField description=3D"set password" name=3D"password=
"
value=3D"@{login.password}" />
=09=09=09=09=09<clickButton name=3D"submit" description=3D"Click the submit=
 button" />
=09=09=09=09</steps>
=09=09=09</webtest>
=09=09</sequential>

=09</macrodef>

</project>

<project name=3D"action">

=09<macrodef name=3D"action">

=09=09<sequential>
=09=09=09<webtest name=3D"action">
=09=09=09=09<config
=09=09=09=09=09  host=3D"mssql1.sw.ins.com"
=09=09=09=09=09  port=3D"8080"
=09=09=09=09=09  basepath=3D"incontrol"/>
=09=09=09  <steps>
=09=09=09=09<followframe name=3D"banner" description=3D"Set focus to banner=
 frame"/>
=09=09=09  </steps>
=09=09=09</webtest>
=09=09</sequential>

=09</macrodef>
</project>

main:
  [webtest] DEBUG (com.canoo.webtest.ant.TestStepSequence) - Creating
TestStepSequence
  [webtest] DEBUG (com.canoo.webtest.boundary.AntBoundary) - Task
'invoke' configured with ant
  [webtest] DEBUG (com.canoo.webtest.steps.AbstractStepContainer) -
Adding WebTest Step: InvokePage at
C:\dev\inc\2.0\test\webtest\modules\mylogin.xml:14:  with
(description=3D"goto start page", url=3D"logon.action", method=3D"GET",
stepType=3D"invoke")
  [webtest] DEBUG (com.canoo.webtest.boundary.AntBoundary) - Task
'setInputField' configured with ant
  [webtest] DEBUG (com.canoo.webtest.steps.AbstractStepContainer) -
Adding WebTest Step: SetInputField at
C:\dev\inc\2.0\test\webtest\modules\mylogin.xml:15:  with
(value=3D"incadmin", description=3D"set user name", name=3D"username",
stepType=3D"setInputField")
  [webtest] DEBUG (com.canoo.webtest.boundary.AntBoundary) - Task
'setInputField' configured with ant
  [webtest] DEBUG (com.canoo.webtest.steps.AbstractStepContainer) -
Adding WebTest Step: SetInputField at
C:\dev\inc\2.0\test\webtest\modules\mylogin.xml:16:  with
(value=3D"incadmin", description=3D"set password", name=3D"password",
stepType=3D"setInputField")
  [webtest] DEBUG (com.canoo.webtest.boundary.AntBoundary) - Task
'clickButton' configured with ant
  [webtest] DEBUG (com.canoo.webtest.steps.AbstractStepContainer) -
Adding WebTest Step: ClickButton at
C:\dev\inc\2.0\test\webtest\modules\mylogin.xml:17:  with
(description=3D"Click the submit button", name=3D"submit",
stepType=3D"clickButton")
  [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest: R_11=
18.
  [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
null "[implict setup step]" (1/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Executing null
"[implict setup step]" (1/6)
  [webtest] DEBUG (com.canoo.webtest.engine.Configuration) - Headers: []
  [webtest]  INFO (com.canoo.webtest.steps.Setup) - Surfing with
browser Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)
  [webtest] DEBUG (com.canoo.webtest.steps.Setup) -
showHtmlParserOutput is off, no listener configured
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Finished null
"[implict setup step]" (1/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Completed Step:
null "[implict setup step]" (1/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - <<<< Successful
Step: null "[implict setup step]" (1/6)
  [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
invoke "goto start page" (2/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Executing invoke
"goto start page" (2/6)
  [webtest]  INFO
(com.canoo.webtest.steps.request.AbstractTargetAction) - -> gotoTarget
by URL: logon.action
  [webtest]  INFO (com.canoo.webtest.steps.request.TargetHelper) -
getting response for url:
http://mssql1.sw.ins.com:8080/incontrol/logon.action
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
window changed to http://mssql1.sw.ins.com:8080/incontrol/logon.action
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Webclient:
com.gargoylesoftware.htmlunit.WebClient@13e15f7
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - script engine:
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine@11410e5
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content loaded
in newly opened window, its content will become current response
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Current form set to =
none
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Current
response now: http://mssql1.sw.ins.com:8080/incontrol/logon.action
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Previous response: n=
ull
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Finished invoke
"goto start page" (2/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Completed Step:
invoke "goto start page" (2/6)
  [webtest] DEBUG (com.canoo.webtest.steps.AbstractBrowserAction) -
Current response has changed during execution of the step, this is now
http://mssql1.sw.ins.com:8080/incontrol/logon.action
  [webtest] DEBUG (com.canoo.webtest.steps.AbstractBrowserAction) -
New current response not saved to file due to configuration
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - <<<< Successful
Step: invoke "goto start page" (2/6)
  [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
setInputField "set user name" (3/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Executing
setInputField "set user name" (3/6)
  [webtest] DEBUG (com.canoo.webtest.util.FormUtil) - Looking for form
with text field named "username"
  [webtest] DEBUG (com.canoo.webtest.util.FormUtil) - No given form or
given form not suitable, trying others
  [webtest] DEBUG (com.canoo.webtest.util.FormUtil) - No current form
or current form not suitable, trying others
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Current form
set to (action=3D/incontrol/authenticate.action)
  [webtest] DEBUG (com.canoo.webtest.steps.form.AbstractSetFieldStep)
- Found matching form HtmlForm[<form
action=3D"/incontrol/authenticate.action" method=3D"POST" id=3D"loginForm">=
]
  [webtest] DEBUG (com.canoo.webtest.steps.form.SetInputField) - Found
1 input field(s)
  [webtest] DEBUG (com.canoo.webtest.steps.form.SetInputField) - Found
0 textarea field(s)
  [webtest]  INFO (com.canoo.webtest.steps.form.AbstractSetFieldStep)
- Found 1 suitable fields, considering only the first one
  [webtest] DEBUG (com.canoo.webtest.steps.form.SetInputField) - Set
text for input HtmlTextInput[<input value=3D"incadmin" type=3D"text"
size=3D"20" name=3D"username" id=3D"username">] to value incadmin
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Finished
setInputField "set user name" (3/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Completed Step:
setInputField "set user name" (3/6)
  [webtest] DEBUG (com.canoo.webtest.steps.AbstractBrowserAction) -
Current response didn't change during step execution
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - <<<< Successful
Step: setInputField "set user name" (3/6)
  [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
setInputField "set password" (4/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Executing
setInputField "set password" (4/6)
  [webtest] DEBUG (com.canoo.webtest.util.FormUtil) - Looking for form
with text field named "password"
  [webtest] DEBUG (com.canoo.webtest.util.FormUtil) - No given form or
given form not suitable, trying others
  [webtest] DEBUG (com.canoo.webtest.util.FormUtil) - Form '' has
suitable text field, using it
  [webtest] DEBUG (com.canoo.webtest.steps.form.AbstractSetFieldStep)
- Found matching form HtmlForm[<form
action=3D"/incontrol/authenticate.action" method=3D"POST" id=3D"loginForm">=
]
  [webtest] DEBUG (com.canoo.webtest.steps.form.SetInputField) - Found
1 input field(s)
  [webtest] DEBUG (com.canoo.webtest.steps.form.SetInputField) - Found
0 textarea field(s)
  [webtest]  INFO (com.canoo.webtest.steps.form.AbstractSetFieldStep)
- Found 1 suitable fields, considering only the first one
  [webtest] DEBUG (com.canoo.webtest.steps.form.SetInputField) - Set
text for input HtmlPasswordInput[<input value=3D"incadmin"
type=3D"password" size=3D"20" name=3D"password">] to value incadmin
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Finished
setInputField "set password" (4/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Completed Step:
setInputField "set password" (4/6)
  [webtest] DEBUG (com.canoo.webtest.steps.AbstractBrowserAction) -
Current response didn't change during step execution
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - <<<< Successful
Step: setInputField "set password" (4/6)
  [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
clickButton "Click the submit button" (5/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Executing
clickButton "Click the submit button" (5/6)
  [webtest]  INFO
(com.canoo.webtest.steps.request.AbstractTargetAction) - -> gotoTarget
by clickButton with name: submit
  [webtest] DEBUG (com.canoo.webtest.steps.request.ClickButton) -
Looking for button in current form
  [webtest] DEBUG (com.canoo.webtest.steps.request.ClickButton) -
Looking for inputs of type submit, image or button in HtmlForm[<form
action=3D"/incontrol/authenticate.action" method=3D"POST" id=3D"loginForm">=
]
  [webtest] DEBUG (com.canoo.webtest.steps.request.ClickButton) -
Examining button: HtmlImageInput[<input type=3D"image"
src=3D"/incontrol/images/loginbutton.jpg" name=3D"submit">]
  [webtest] DEBUG (com.canoo.webtest.steps.request.ClickButton) -
image button found: HtmlImageInput[<input type=3D"image"
src=3D"/incontrol/images/loginbutton.jpg" name=3D"submit">]
  [webtest]  INFO (com.canoo.webtest.steps.request.ClickButton) - ->
findTarget(by input): name=3Dsubmit value=3D
  [webtest]  INFO (org.apache.commons.httpclient.HttpMethodDirector) -
Redirect requested but followRedirects is disabled
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
window changed to about:blank
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Webclient:
com.gargoylesoftware.htmlunit.WebClient@13e15f7
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - script engine:
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine@11410e5
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
frame window has changed without javascript while enclosing page is
loading, it will NOT become current response
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's state: loading
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's url: http://mssql1.sw.ins.com:8080/incontrol/main.vm
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
window changed to about:blank
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Webclient:
com.gargoylesoftware.htmlunit.WebClient@13e15f7
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - script engine:
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine@11410e5
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
frame window has changed without javascript while enclosing page is
loading, it will NOT become current response
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's state: loading
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's url: http://mssql1.sw.ins.com:8080/incontrol/main.vm
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
window changed to http://mssql1.sw.ins.com:8080/incontrol/ncbanner.vm
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Webclient:
com.gargoylesoftware.htmlunit.WebClient@13e15f7
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - script engine:
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine@11410e5
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
frame window has changed without javascript while enclosing page is
loading, it will NOT become current response
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's state: loading
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's url: http://mssql1.sw.ins.com:8080/incontrol/main.vm
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
window changed to about:blank
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Webclient:
com.gargoylesoftware.htmlunit.WebClient@13e15f7
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - script engine:
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine@11410e5
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
frame window has changed without javascript while enclosing page is
loading, it will NOT become current response
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's state: loading
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's url: http://mssql1.sw.ins.com:8080/incontrol/subframe_about.vm
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
window changed to about:blank
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Webclient:
com.gargoylesoftware.htmlunit.WebClient@13e15f7
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - script engine:
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine@11410e5
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
frame window has changed without javascript while enclosing page is
loading, it will NOT become current response
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's state: loading
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's url: http://mssql1.sw.ins.com:8080/incontrol/subframe_about.vm
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
window changed to about:blank
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Webclient:
com.gargoylesoftware.htmlunit.WebClient@13e15f7
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - script engine:
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine@11410e5
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
frame window has changed without javascript while enclosing page is
loading, it will NOT become current response
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's state: loading
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's url: http://mssql1.sw.ins.com:8080/incontrol/subframe_about.vm
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
window changed to
http://mssql1.sw.ins.com:8080/incontrol/blankTreeFrame.html
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Webclient:
com.gargoylesoftware.htmlunit.WebClient@13e15f7
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - script engine:
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine@11410e5
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
frame window has changed without javascript while enclosing page is
loading, it will NOT become current response
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's state: loading
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's url: http://mssql1.sw.ins.com:8080/incontrol/subframe_about.vm
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
window changed to
http://mssql1.sw.ins.com:8080/incontrol/sub_banner.vm
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Webclient:
com.gargoylesoftware.htmlunit.WebClient@13e15f7
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - script engine:
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine@11410e5
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
frame window has changed without javascript while enclosing page is
loading, it will NOT become current response
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's state: loading
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's url: http://mssql1.sw.ins.com:8080/incontrol/subframe_about.vm
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
window changed to
http://mssql1.sw.ins.com:8080/incontrol/help/about.do
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Webclient:
com.gargoylesoftware.htmlunit.WebClient@13e15f7
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - script engine:
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine@11410e5
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
frame window has changed without javascript while enclosing page is
loading, it will NOT become current response
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's state: loading
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's url: http://mssql1.sw.ins.com:8080/incontrol/subframe_about.vm
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
window changed to
http://mssql1.sw.ins.com:8080/incontrol/subframe_about.vm
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Webclient:
com.gargoylesoftware.htmlunit.WebClient@13e15f7
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - script engine:
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine@11410e5
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
frame window has changed without javascript while enclosing page is
loading, it will NOT become current response
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's state: loading
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Enclosing
page's url: http://mssql1.sw.ins.com:8080/incontrol/main.vm
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
window changed to http://mssql1.sw.ins.com:8080/incontrol/main.vm
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Webclient:
com.gargoylesoftware.htmlunit.WebClient@13e15f7
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - script engine:
com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine@11410e5
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Content of
current window changed, it will become current response
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Current form set to =
none
  [webtest]  INFO (com.canoo.webtest.engine.Context) - Current
response now: http://mssql1.sw.ins.com:8080/incontrol/main.vm
  [webtest] DEBUG (com.canoo.webtest.engine.Context) - Previous
response: http://mssql1.sw.ins.com:8080/incontrol/logon.action
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Finished
clickButton "Click the submit button" (5/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Completed Step:
clickButton "Click the submit button" (5/6)
  [webtest] DEBUG (com.canoo.webtest.steps.AbstractBrowserAction) -
Current response has changed during execution of the step, this is now
http://mssql1.sw.ins.com:8080/incontrol/main.vm
  [webtest] DEBUG (com.canoo.webtest.steps.AbstractBrowserAction) -
New current response not saved to file due to configuration
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - <<<< Successful
Step: clickButton "Click the submit button" (5/6)
  [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
null "[implicit tear down step]" (6/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Executing null
"[implicit tear down step]" (6/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Finished null
"[implicit tear down step]" (6/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Completed Step:
null "[implicit tear down step]" (6/6)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - <<<< Successful
Step: null "[implicit tear down step]" (6/6)
  [webtest] DEBUG (com.canoo.webtest.ant.WebtestTask) - stopBuildIfNeeded 1
  [webtest] DEBUG (com.canoo.webtest.ant.WebtestTask) - stopBuildIfNeeded 2
  [webtest] DEBUG (com.canoo.webtest.ant.TestStepSequence) - Creating
TestStepSequence
  [webtest] DEBUG (com.canoo.webtest.boundary.AntBoundary) - Task
'followframe' configured with ant
  [webtest] DEBUG (com.canoo.webtest.steps.AbstractStepContainer) -
Adding WebTest Step: FollowFrame at
C:\dev\inc\2.0\test\webtest\modules\action.xml:12:  with
(description=3D"Set focus to banner frame", name=3D"banner",
stepType=3D"followframe")
  [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest: R_11=
18.
  [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
null "[implict setup step]" (1/3)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Executing null
"[implict setup step]" (1/3)
  [webtest] DEBUG (com.canoo.webtest.engine.Configuration) - Headers: []
  [webtest]  INFO (com.canoo.webtest.steps.Setup) - Surfing with
browser Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)
  [webtest] DEBUG (com.canoo.webtest.steps.Setup) -
showHtmlParserOutput is off, no listener configured
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Finished null
"[implict setup step]" (1/3)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Completed Step:
null "[implict setup step]" (1/3)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - <<<< Successful
Step: null "[implict setup step]" (1/3)
  [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:
followframe "Set focus to banner frame" (2/3)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Executing
followframe "Set focus to banner frame" (2/3)
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Step failed at
C:\dev\inc\2.0\test\webtest\modules\action.xml:12:  with exception
  [webtest] com.canoo.webtest.engine.StepExecutionException: No
current response available! Is previous invoke missing?, Step:
FollowFrame at C:\dev\inc\2.0\test\webtest\modules\action.xml:12:=20
with (description=3D"Set focus to banner frame", name=3D"banner",
stepType=3D"followframe")
  [webtest] =09at com.canoo.webtest.steps.Step.paramCheck(Step.java:578)
  [webtest] =09at com.canoo.webtest.steps.Step.nullResponseCheck(Step.java:=
628)
  [webtest] =09at
com.canoo.webtest.steps.request.FollowFrame.verifyParameters(FollowFrame.ja=
va:70)
  [webtest] =09at com.canoo.webtest.steps.Step.execute(Step.java:145)
  [webtest] =09at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:=
28)
  [webtest] =09at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.jav=
a:79)
  [webtest] =09at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [webtest] =09at org.apache.tools.ant.Task.perform(Task.java:364)
  [webtest] =09at
org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
  [webtest] =09at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [webtest] =09at org.apache.tools.ant.Task.perform(Task.java:364)
  [webtest] =09at
org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:378)
  [webtest] =09at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [webtest] =09at org.apache.tools.ant.Task.perform(Task.java:364)
  [webtest] =09at org.apache.tools.ant.Target.execute(Target.java:341)
  [webtest] =09at org.apache.tools.ant.Target.performTasks(Target.java:369)
  [webtest] =09at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
  [webtest] =09at org.apache.tools.ant.Project.executeTarget(Project.java:1=
185)
  [webtest] =09at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.=
java:40)
  [webtest] =09at org.apache.tools.ant.Project.executeTargets(Project.java:=
1068)
  [webtest] =09at org.apache.tools.ant.Main.runBuild(Main.java:668)
  [webtest] =09at org.apache.tools.ant.Main.startAnt(Main.java:187)
  [webtest] =09at org.apache.tools.ant.launch.Launcher.run(Launcher.java:24=
6)
  [webtest] =09at org.apache.tools.ant.launch.Launcher.main(Launcher.java:6=
7)
  [webtest]  INFO (com.canoo.webtest.steps.Step) - Exception thrown
from this class: com.canoo.webtest.engine.StepExecutionException
  [webtest]  INFO (com.canoo.webtest.steps.Step) - Message was: No
current response available! Is previous invoke missing?
  [webtest] DEBUG (com.canoo.webtest.steps.Step) - Completed Step:
followframe "Set focus to banner frame" (2/3)
  [webtest] DEBUG (com.canoo.webtest.steps.AbstractBrowserAction) -
Current response didn't change during step execution
  [webtest] DEBUG (com.canoo.webtest.ant.WebtestTask) - stopBuildIfNeeded 1
  [webtest] DEBUG (com.canoo.webtest.ant.WebtestTask) - throw
  [webtest] DEBUG (com.canoo.webtest.ant.WebtestTask) - str: Test failed.
  [webtest] Exception raised:
com.canoo.webtest.engine.StepExecutionException: No current response
available! Is previous invoke missing?, Step: FollowFrame at
C:\dev\inc\2.0\test\webtest\modules\action.xml:12:  with
(description=3D"Set focus to banner frame", name=3D"banner",
stepType=3D"followframe")com.canoo.webtest.engine.StepExecutionException:
No current response available! Is previous invoke missing?, Step:
FollowFrame at C:\dev\inc\2.0\test\webtest\modules\action.xml:12:=20
with (description=3D"Set focus to banner frame", name=3D"banner",
stepType=3D"followframe")
  [webtest] =09at com.canoo.webtest.steps.Step.paramCheck(Step.java:578)
  [webtest] =09at com.canoo.webtest.steps.Step.nullResponseCheck(Step.java:=
628)
  [webtest] =09at
com.canoo.webtest.steps.request.FollowFrame.verifyParameters(FollowFrame.ja=
va:70)
  [webtest] =09at com.canoo.webtest.steps.Step.execute(Step.java:145)
  [webtest] =09at com.canoo.webtest.engine.Engine.executeSteps(Engine.java:=
28)
  [webtest] =09at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.jav=
a:79)
  [webtest] =09at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [webtest] =09at org.apache.tools.ant.Task.perform(Task.java:364)
  [webtest] =09at
org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
  [webtest] =09at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [webtest] =09at org.apache.tools.ant.Task.perform(Task.java:364)
  [webtest] =09at
org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:378)
  [webtest] =09at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [webtest] =09at org.apache.tools.ant.Task.perform(Task.java:364)
  [webtest] =09at org.apache.tools.ant.Target.execute(Target.java:341)
  [webtest] =09at org.apache.tools.ant.Target.performTasks(Target.java:369)
  [webtest] =09at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
  [webtest] =09at org.apache.tools.ant.Project.executeTarget(Project.java:1=
185)
  [webtest] =09at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.=
java:40)
  [webtest] =09at org.apache.tools.ant.Project.executeTargets(Project.java:=
1068)
  [webtest] =09at org.apache.tools.ant.Main.runBuild(Main.java:668)
  [webtest] =09at org.apache.tools.ant.Main.startAnt(Main.java:187)
  [webtest] =09at org.apache.tools.ant.launch.Launcher.run(Launcher.java:24=
6)
  [webtest] =09at org.apache.tools.ant.launch.Launcher.main(Launcher.java:6=
7)


On 1/11/06, Paul King <paulk@asert.com.au> wrote:
>
> What you are describing is intended to be supported as of the last
> few weeks. Have you tried with a recent build? This is very new and
> powerful functionality but we haven't been able to test against all
> possible usage scenarios.  Let us know if it is currently not working
> and what is going wrong with as many details as you can supply and
> preferably the smallest example which highlights your problem.
>
> Cheers, Paul.
>
> Mike Danifo wrote:
> > Hello,
> > I realize this post is over a year old, but it discusses exactly the pr=
oblem I
> > am currently facing.
> >
> > I am trying to implement a similar scenario, trying to implement a reus=
able
> > login module.
> >
> > The limitation of the solution below is that I'm trying to make the log=
in module
> > an ant macro, with an attribute of login.name and login.password, and t=
he below
> > solution does not offer a way to call the module and dynamically pass i=
n the
> > login.name and login.password attributes.
> >
> > So, instead of using
> >
> > <!DOCTYPE project SYSTEM "../WebTest.dtd"[
> >       <!ENTITY login SYSTEM "login.xml">
> > ]>
> >
> > and calling the entity
> >
> > &login;
> >
> > I am trying to do:
> >
> > <import file=3D"${webtest.script.home}/modules/login.xml"/>
> >
> > and calling the macro contained in login.xml
> >
> > <login login.name=3D"webtest" login.password=3D"password"/>
> >
> > Yet any actions after calling the macro are throwing the error is
> > com.canoo.webtest.engine.StepExecutionException: Last response not vali=
d. Is a
> > previous invoke missing?
> >
> > Any ideas for a solution to this problem?
> >
> > thanks
> >
> > -Mike
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>