I'm running version 2.6 and HtmlUnit 2.1.
The third party library is actually a spell checker - JSpell Evolution. It 
modifies the page in different ways to insert its component, depending on what 
type of browser it thinks is running. If it detects a window.getComputedStyle 
function, then it uses it and modifies styles by appending raw HTML. Otherwise, 
it uses element.currentStyle and modifies styles by manipulating the 
document.styleSheets object. The problem is that it doesn't detect 
window.getComputedStyle, but the other path uses IE specific calls 
(styleSheet.addRule), which are not supported by HtmlUnit either..
So, it seems we need an implementation of window.getComputedStyle or 
styleSheet.addRule in HtmlUnit.
wes
----- Original Message ----
From: Marc Guillemot <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, June 16, 2008 1:41:18 AM
Subject: Re: [Webtest] browser specific JavaScript

As always: which WebTest version do you use?

HtmlUnit is already able to handle correctly fairly complicated AJAX
libraries, both when simulating Firefox and Internet Explorer (GWT,
Sarissa, JQuery, ... and more are coming). If you encounter problems,
you should upgrade to the latest HtmlUnit snapshot and if the problems
still persist, you'll need to investigate to help fixing them. If the
problem is only in micalculation of the browser type, it shouldn't be
really complicated.

scriptStep has nothing to do with JS support within the simulated browser.

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


W C wrote:
> I'm using a third party JavaScript library and it has lots of JavaScript
> conditions for browser incompatibilities. However, the JavaScript
> inevitably miscalculates the type of browser and then tries to utilize
> features that the WebTest browser does not support. This results in lots
> of errors in scripts on the page. Is there any workaround for this (e.g.
> using an IE plugin)?
>  
> I am attempting to test our integration of the Ajax-style library, so I
> have to run with JavaScript enabled.
>  
> I saw that the scriptStep does not support accesing functions on the
> page under test. Is there any way to get access to that context from
> WebTest?
>  
>  
> wes
>  
> 

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest



      

Reply via email to