[Webtest] JavaScripts: Problems with relative path

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Fri, 11 Jan 2008 16:10:28 +0100


Willi Kuhnis wrote:
> Hi,
> 
> I call the invoke - function with a url like
> http://10.60.36.59/MyWebAppli/Login.aspx. This works.
> Then my Application calls something like this:
> <script language="javascript" type="text/javascript"
> src="../Script/color_functions.js"></script>
> 
> Then Webtest gives me this error message:
> javascript error404 Not Found for http://10.60.36.59/Script/color_functions.js
> 
> So I think it dont work correctly with "../Script".
> 
> maybe it also has something to do with host and basepath in <config> ?
> <config
> 	protocol="http"
> 	host="10.60.36.59/MyWebAppli"
> 	basepath="10.60.36.59/MyWebAppli"
> 	port="80"
> 	autorefresh="false"
> 	showhtmlparseroutput="true"
> 	saveresponse="true"
> 	resultfile="results.xml"
> 	timeout="2000">
> </config>
> 
> 
>  Or is it a error ?
> Thanks a lot for help
> 
> 

seems to be an error in your app that references a js file that doesn't
exist.
HtmlUnit-1.14 doesn't complain about this kind of pb as browser don't.
In some cases it will be annoying as it helps to find badly referenced
js files.

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