|
----------------------- Forwarded Message -----------------------
From: Sophie De Malet Roquefort <[email protected]>
To: Marc Guillemot <[email protected]>
Date: Wed, 23 Jun 2010 11:47:01 +0100
Subject: re[2]: [Webtest] importStylesheet error in _javascript_.
Hi Marc, I have tracked down the source of the problem but still unsure how to fix it.
I have set the default browser in my webtest to 'FF3':
config { option name: "ThrowExceptionOnScriptError",value: "true" browser: "Firefox3" } and when I call the following in my Webtest it is returning 'Mozilla'.
println step.context.getWebClient().getBrowserVersion().getApplicationCodeName()
However, I have the following in my _javascript_:
var IE = window.ActiveXObject != null;
var firefox = (document.implementation && document.implementation.createDocument) != null; function loadStreets() { var str = "IE: " + IE + "; Firefox: " + firefox; alert (str); document.getElementById("Browser").value= str; } This is always returning : IE:true; Firefox:false;
So it would seem that I am using the Internet Explorer branch of the _javascript_ code where importStylesheet is not defined. Kind regards
Sophie Sophie De Malet Roquefort
IT Department
0131 555 1100 Please let me know if this e-mail address is not the best one to use.
This e-mail is intended for the named addressee only. Its contents are private and confidential and should not be read, copied or disclosed to or by any other person. If you have received this transmission in error, please notify the sender immediately by e-mail or telephone (0131 555 1100), delete the contents of this transmission and destroy any copies made. Copyright Data Discoveries Limited. All rights reserved. No part of this communication may be reproduced without the prior written permission of Data Discoveries Limited.
Opinions, conclusions and other information in this message that do not relate to the official business of Data Discoveries Limited shall be understood as neither given nor endorsed by it. Internet e-mails are not necessarily secure. Data Discoveries Limited does not accept responsibility for changes made to this message after it was sent or viruses transmitted through this e-mail or any attachment. You should carry out your own virus checking procedure before opening any attachment to this e-mail. The e-mail and IT systems of Data Discoveries Limited are subject to random monitoring and recording by or on behalf of Data Discoveries Limited.
Thank you.
Data Discoveries Limited: Registered in Scotland with Registered Number SC157375.
Registered Office: 16/1 Timber Bush Edinburgh EH6 6QH. VAT Registration Number: GB 663 8176 09. Member of the Direct Marketing Association. ----------------------- Original Message -----------------------
From: Marc Guillemot <[email protected]>
Cc:
Date: Wed, 16 Jun 2010 13:44:11 +0200
Subject: Re: [Webtest] importStylesheet error in _javascript_.
Hi Sophie,
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest
XSLTProcessor.importStylesheet is definitely available when simulating Firefox. Are you sure that you use the right config option to do it? Cheers, Marc. Sophie De Malet Roquefort wrote: > Hello, > > > > I am getting the following error: > > > > TypeError: cannot find function importStylesheet in object when I call > the following code from my Webtest: > > > > *if* (*typeof* XSLTProcessor != "undefined") { > > * var* oProcessor = *new* XSLTProcessor(); > > oProcessor.importStylesheet(oXslt); > > * var* oResultDom = oProcessor.transformToDocument(oXml); > > * var* sResult = oResultDom.xml; > > * if* (sResult.indexOf("<transformiix:result") > -1) { > > sResult = sResult.substring(sResult.indexOf(">") + 1, > sResult.lastIndexOf("<")); > > } > > * return* sResult; > > } *else* *if* (fxXml.useActiveX) { > > * return* oXml.transformNode(oXslt); > > } *else* { > > *throw* *new* Error("No XSLT engine found."); > > } > > > > I am using Firefox and it seems that the importStylesheet function > should be available in htmlunit. > > I am also using the latest snapshot of canoo webtest in a maven project > - i.e. 3.1-SNAPSHOT.jar > > > > Can anyone help? > > > > Thankyou > > > > Kind regards > Sophie > > > Sophie De Malet Roquefort > IT Department > 0131 555 1100 > > T: 0131 555 1100 > F: 0131 555 6300 > W: www.datadiscoveries.com <http://www.datadiscoveries.com> > <http://www.datadiscoveries.com> > > Data Discoveries Logo > > Please let me know if this e-mail address is not the best one to use. > > This e-mail is intended for the named addressee only. Its contents are > private and confidential and should not be read, copied or disclosed to > or by any other person. If you have received this transmission in error, > please notify the sender immediately by e-mail or telephone (0131 555 > 1100), delete the contents of this transmission and destroy any copies > made. Copyright Data Discoveries Limited. All rights reserved. No part > of this communication may be reproduced without the prior written > permission of Data Discoveries Limited. > > Opinions, conclusions and other information in this message that do not > relate to the official business of Data Discoveries Limited shall be > understood as neither given nor endorsed by it. Internet e-mails are not > necessarily secure. Data Discoveries Limited does not accept > responsibility for changes made to this message after it was sent or > viruses transmitted through this e-mail or any attachment. You should > carry out your own virus checking procedure before opening any > attachment to this e-mail. The e-mail and IT systems of Data Discoveries > Limited are subject to random monitoring and recording by or on behalf > of Data Discoveries Limited. > Thank you. > > Data Discoveries Limited: Registered in Scotland with Registered Number > SC157375. > Registered Office: 16/1 Timber Bush Edinburgh EH6 6QH. VAT Registration > Number: GB 663 8176 09. > Member of the Direct Marketing Association. > > > _______________________________________________ WebTest mailing list > [email protected] http://lists.canoo.com/mailman/listinfo/webtest _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest |
- [Webtest] importStylesheet error in Javascript. Sophie De Malet Roquefort
- Re: [Webtest] importStylesheet error in Jav... Marc Guillemot
- re[2]: [Webtest] importStylesheet error... Sophie De Malet Roquefort
- Re: [Webtest] importStylesheet erro... Marc Guillemot
- Re: [Webtest] importStylesheet error in Jav... Sophie De Malet Roquefort
- FWD: re[2]: [Webtest] importStylesheet erro... Sophie De Malet Roquefort

