I fixed it adding this line:
enableJavaScript enable:"false"
If I don't add that line, all the testcases fail. I will keep investigating.
Thanks Marc
2009/7/21 Marc Guillemot <[email protected]>
> Hi,
>
> I don't see any error in the provided log. Only a warning that has no
> consequence on the JavaScript execution.
>
> Cheers,
> Marc.
>
> Hernan Castagnola wrote:
>
>> My test case is failing because of javascript. Is there any way to fix
>> this?
>>
>> Thanks for your help!
>>
>>
>>
>> <project default="test">
>> <target name="test">
>> <webtest name="check that Olx Search is returning results with the
>> corresponding keyword">
>> <config
>> host="www.olx.com <http://www.olx.com>"
>> protocol="http"
>> browser="Firefox3"
>> />
>>
>> <invoke url="/" description="Go to OLX (in English)" />
>> <verifyTitle text="Classifieds, Free Classifieds, Online
>> Classifieds | OLX.com" />
>> <setInputField name="searchbox" value="car" />
>> <clickButton class="button2" />
>> <verifyTitle text="car" />
>> </webtest>
>> </target>
>> </project>
>>
>>
>>
>> [config] INFO (com.canoo.webtest.engine.Configuration) - Surfing with
>> browser FF3
>> [steps] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: steps
>> "Implicit <steps> task" (1/5)
>> [invoke] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: invoke
>> "Go to OLX (in English)" (1/5)
>> [invoke] INFO (com.canoo.webtest.steps.request.TargetHelper) - getting
>> response for url: http://www.olx.com/
>> [invoke] WARN (com.gargoylesoftware.htmlunit.html.HtmlPage) - Obsolete
>> content type encountered: 'text/javascript'.
>> [invoke] WARN (com.gargoylesoftware.htmlunit.html.HtmlPage) - Expected
>> content type of 'application/javascript' or 'application/ecmascript' for
>> remotely loaded JavaScript element at '
>> http://ads.olx.com/services/featuredad/getForShow.jsonCallback?siteId=1&conceptId=%5B1%5D&limit=4&dim1=1&dim3=0&dim4=0<
>> http://ads.olx.com/services/featuredad/getForShow.jsonCallback?siteId=1&conceptId=%5B1%5D&limit=4&dim1=1&dim3=0&dim4=0>',
>> but got 'text/html'.
>> [invoke] WARN (com.gargoylesoftware.htmlunit.html.HtmlPage) - Obsolete
>> content type encountered: 'text/javascript'.
>> INFO (com.canoo.webtest.engine.WebClientContext) - Responses restored
>> INFO (com.canoo.webtest.ant.WebtestTask) - Finished executing webtest
>> "check that Olx Search is returning results with the corresponding keyword"
>> (/home/hernan/dev/testing/canoo/build/projects/olx/tests/OlxSearch.xml:3: )
>> INFO (com.canoo.webtest.reporting.XmlReporter) - Writing report to
>> /home/hernan/dev/testing/canoo/build/projects/olx/results/001_CheckThatOlxSear/WebTestReport.xml
>> INFO (com.canoo.webtest.ant.WebtestTask) - Test report successfully
>> created.
>>
>>
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
>