Hi Karen,

as far as I can remember, HtmlUnit doesn't support history.back(). With
WebTest you can use <previousResponse/> instead of clicking this link.

Marc.
-- 
Blog: http://mguillem.wordpress.com

Xiaomei Li wrote:
> Hi,
>   I have a html doc with the following code:
> <p><span id="viewCaption">&nbsp;</span><br />
> Click <a href="javascript:history.back()"><span
> style="font-weight: bold;">Here</span></a> to go back
> to Search Result
> </p>.
> 
> In my webtest script, I have a step to click "Here",
> and it should direct the page back to the search
> result.  
> I have tried:
>   <clickLink
>            label="Here" />
> and
>   <clickElement
>       description="click link back to search result
>       xpath="//a/span[text()='Here']" />
> But when it runs, it didn't go to the right page.  Any
> ideas?
> 
> Thanks,
> Karen

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to