ok.
Seems that you should use <previousResponse/> after each "download". If
the links are present in a page, it's "probably" easier to maintain than
a serie of invoke with urls hard coded in the WebTest file.
Marc.
Sven Haiges wrote:
Hi Marc,
the error messages I was getting was kind of like the one I posted
although I was really getting mixed up wiht all the changes I was
making... so maybe the message was not related. I think my problem is
solved now, I use several invokes after each other and it works fine
:-). I think initially i was trying to use clickLink for "multiple,
sequential" downloads and then the problem was that the second clickLink
worked on the XLS file... which was a logical error on my side. I was
just trying to have all files on that page downloaded...
Thanx for you help!
Cheers\
Sven
On 2/12/07, *Marc Guillemot* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Just a question: did you work too late last Friday or is the error
message "Current response is not an HTML page but of type
application/vnd.ms-excel" not clear enough?
Marc.
Sven Haiges wrote:
> Paul thx a lot for this. I guess you are right, I was assuming to
stay
> on the html page and have the file just downloaded.. but that's
not the
> case. Will investigate further this afternoon, for now it is running
> qutie nicely with some minor changes.
>
> Cheers\
> Sven
>
> On 2/9/07, *Paul King* < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>>
> wrote:
>
>
> It is a bit hard to know for sure without seeing your test steps
> but it looks like a previous step has returned an Excel
spreadsheet.
> You can use the Excel steps to test that but you can't click a
> link on an Excel spreadsheet - we don't support that yet.
> You might just need a <previousResponse/> to go back to the
> previous HTML page to keep testing from there.
>
> Paul.
>
> Sven Haiges wrote:
> > That was the error:
> >
> > Exception raised:
com.canoo.webtest.engine.StepExecutionException :
> > Current response is not an HTML page but of type
> > application/vnd.ms-excel, Step: ClickLink at C:\eclips
> >
>
e_workspaces\ws1\adflex\WEB-INF\src-webtest\usecases\CheckPackages.xml:168:
>
> > with
> >
>
(taskName="clickLink")com.canoo.webtest.engine.StepExecutionException:
> > Current response
> > is not an HTML page but of type application/vnd.ms-excel,
Step:
> > ClickLink at
> >
>
C:\eclipse_workspaces\ws1\adflex\WEB-INF\src-webtest\usecases\CheckPackages.xml:168:
> > with (t
> > askName="clickLink")
> > at
> >
com.canoo.webtest.engine.WebClientContext.getCurrentHtmlResponse
> (WebClientContext.java:185)
> > at
> >
> com.canoo.webtest.engine.Context.getCurrentHtmlResponse
(Context.java:85)
> > at
com.canoo.webtest.steps.request.ClickLink.findTarget
> > (ClickLink.java :49)
> > at
> >
> com.canoo.webtest.steps.request.AbstractTargetAction$1.call
(AbstractTargetAction.java:108)
> > at
> >
>
com.canoo.webtest.steps.request.TargetHelper.protectedGoto(TargetHelper.java
> :88)
> > at
> >
>
com.canoo.webtest.steps.request.AbstractTargetAction.gotoTarget(AbstractTargetAction.java:106)
> > at
> >
>
com.canoo.webtest.steps.request.AbstractTargetAction.doExecute
(AbstractTargetAction.java
> :78)
> > at com.canoo.webtest.steps.Step.execute(Step.java:106)
> > at
> >
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java :275)
> > at org.apache.tools.ant.Task.perform (Task.java:364)
> > at com.canoo.webtest.ant.TestStepSequence.executeSteps
> > (TestStepSequence.java:43)
> > at
> >
>
com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31)
>
> > at com.canoo.webtest.steps.Step.execute(Step.java:106)
> > at org.apache.tools.ant.Task.perform (Task.java:364)
> > at
> com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:164)
> > at
> > org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:275)
> > at org.apache.tools.ant.Task.perform (Task.java:364)
> > at org.apache.tools.ant.Target.execute(
Target.java:341)
> > at org.apache.tools.ant.Target.performTasks
(Target.java:369)
> > at
> >
org.apache.tools.ant.Project.executeSortedTargets(Project.java :1216)
> > at
> >
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets
> (SingleCheckExecutor.java:37)
> > at
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> > at org.apache.tools.ant.taskdefs.Ant.execute
(Ant.java :382)
> > at
> > org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:275)
> > at org.apache.tools.ant.Task.perform(Task.java:364)
> > at org.apache.tools.ant.Target.execute(Target.java
:341)
> > at org.apache.tools.ant.Target.performTasks
(Target.java:369)
> > at
> > org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1216)
> > at
> org.apache.tools.ant.Project.executeTarget(Project.java :1185)
> > at
> >
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExecutor.java:40)
> > at
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> > at org.apache.tools.ant.Main.runBuild ( Main.java:668)
> > at org.apache.tools.ant.Main.startAnt(Main.java:187)
> > at
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
> > at org.apache.tools.ant.launch.Launcher.main
> (Launcher.java :67)
> >
> > But now it works with invoke url= ...
> >
> > The only problem I got with this is that the link I wanted to
> click on
> > has got a strange, computed URL. Extracting that URL out
of the
> page and
> > putting it in the url attribute of invoke was a bit
complicated, but
> > easily solvable with an span id=""... but for now that's ok.
> >
> > So should it work with clickLink, too?
> >
> > Mmh.
> >
> > Cheers\
> > Sven
> >
> > On 2/9/07, *Marc Guillemot* < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>> wrote:
> >
> >
> > What for an error? No html is expected... unless your
server sets
> > incorrect
> > content type headers.
> >
> > Marc.
> >
> >
> > Sven Haiges-3 wrote:
> > >
> > > ... silly me, via invoke... sorry!
> > >
> > > Sven
> > >
> > > --
> > > Sven Haiges
> > > [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>
> <mailto: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>
> > >
> > > Skype: hansamann
> > > Personal Homepage, Wiki & Blog:
http://www.svenhaiges.de
> > >
> > > Subscribe to the Grails Podcast:
> > > http://hansamann.podspot.de/rss
> <http://hansamann.podspot.de/rss>
> > >
> > >
> >
> _______________________________________________
> WebTest mailing list
> [email protected] <mailto:[email protected]>
<mailto: [email protected] <mailto:[email protected]>>
> http://lists.canoo.com/mailman/listinfo/webtest
>
>
>
>
> --
> Sven Haiges
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
>
> Skype: hansamann
> Personal Homepage, Wiki & Blog: http://www.svenhaiges.de
>
> Subscribe to the Grails Podcast:
> http://hansamann.podspot.de/rss <http://hansamann.podspot.de/rss>
_______________________________________________
WebTest mailing list
[email protected] <mailto:[email protected]>
http://lists.canoo.com/mailman/listinfo/webtest
<http://lists.canoo.com/mailman/listinfo/webtest>
--
Sven Haiges
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Skype: hansamann
Personal Homepage, Wiki & Blog: http://www.svenhaiges.de
Subscribe to the Grails Podcast:
http://hansamann.podspot.de/rss
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest