1

Possible Duplicate:
capturing javascript error in selenium

can we capture/automate the js errors thrown in browser while clicking the page .Is it possible to capture with selenium (as far my knowledge i think no!)

2 Answers 2

1

Well I'll repost it here again. You can do it by handling window.onerror event. See the following link http://www.silverwareconsulting.com/index.cfm/2010/6/7/Checking-for-JavaScript-Errors-with-Selenium. But anyway, this question is possibly duplicate with this one.

Sign up to request clarification or add additional context in comments.

Comments

1

You can detect JavaScript error using Selenium. Following blog will be great help to you http://incodewetrustinc.blogspot.com/2008/06/detecting-javascript-errors-with.html

1 Comment

but we have to add that script in product code or can we have it in some other way.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.