Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Why WebViewer doesn't support javascript communication methods?


I want WebViewer to be able to communicate with my application in order to handle my logs in any way I want (eg. run RegexBuddy with parameters from a log in order to debug some regex). I tried to use WebSocket (fails with “‘WebSocket’ is unidentified” error), iframe + postmessage (fails to load iframe content), XmlHttpRequest (fails with “access is denied” error, since it’s cross-domain).

I think that Microsoft Internet Explorer control used by WebViewer uses some old version of IE. I have IE 10 installed and it supports all the methods I’ve mentioned above. I tried to force the control to utilize IE 10 features by using the tips found here, but it didn’t work. Those tips worked for my applications which use WebBrowser control, but not for WebViewer.

Could you please tell me whether there’s something that can be done to fix my problem?



Thanks for your posting and sorry for the delayed response, we somehow missed this posting. The WebViewer doesn’t support advanced web technologies and is basically meant to display HTML-based log content. While we are using the standard IE control, I believe some of the techniques aren’t really supported due to permissions as you mentioned and others aren’t supported because we are still using an older version of the control. If you could share a few more details on what you are trying to accomplish, I’m happy to suggest the best ways to implement this with SmartInspect, if possible.

Sorry again for the delayed response and please let me know in case you have any further questions.



Thank you for your response.

I’m basically trying to develop my own application, which would serve as a custom viewer for SmartInspect Console. The app would enable me to handle the logged data in any way I want. I could even automate some actions which I usually perform when certain logs appear.

Eg. when some regex fails, I log it and the text on which it failed and then my app gives me an option to automate the process of debugging that regex. Doing something like that manually gets pretty frustrating after couple of times.

To write my app, I need to be able to communicate with SmartInspect Console. When I select a log in SmartInspect Console I want it to notify my app and send some data to it.

I somehow solved my problem by using the clipboard. My app monitors the clipboard and WebViewer launches simple javascript code that copies the contents of the body tag. It’s not a very elegant solution and it has some size limitations, but for now it works and I couldn’t find a better way. If you can think of some better ways to achieve what I want, I’ll be glad to hear it.


Thanks for the explanation. This is difficult to achieve with SmartInspect as there is currently no support for triggering external actions or notifying external tools in this way. If the JS based solution works for now, I would recommend using this approach for now as there currently isn’t a better solution or workaround for this.