You can tell Webtest to not throw an exception on a Javascript error:
<groovy>
step.context.webClient.throwExceptionOnScriptError = false;
</groovy>
Then turn on again after the problem code.
--
Jonathan Rosenberg
Founder & Executive Director, Tabby's Place
http://www.tabbysplace.org/
From: [email protected] [mailto:[email protected]]
On Behalf Of Thibaut Colar
Sent: Monday, October 25, 2010 6:54 PM
To: [email protected]
Subject: [Webtest] Javascript error - what to do
Hello I'm pretty new to Canoo webTest, and am having an issue testing our
site.
It fails because of a javascript error (however firefox error console do not
show any error)
Anyway to either find a way to resolve that or at least ignore it ?
Thanks.
---
Error
Message
JavaScript error loading page https://pcoastqa.pcf.com/: TypeError: Cannot
find function createComment in object [object]. (WebtestCase.groovy#87)
---
Here is my test
---
public class PCoastTest extends WebtestCase
{
void testHomePage()
{
webtest("Check pcoast home page")
{
invoke url: "https://pcoastqa.pcf.com/", description: "Go to
homepage"
verifyTitle "Title"
// .....
}
}
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest