This Question is Possibly Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
7 Replies Last post: Feb 16, 2009 4:43 AM by Jonathan McBrien  
Cesar Arturo Beginner 3 posts since
Oct 24, 2008
Currently Being Moderated

Oct 24, 2008 6:59 AM

Read Local XML data Using Selenium IDE user-extensions.js

Hello!!!

 

Im new working with Selenium IDE. And im writing some User-Extensions for one WebPage testing

 

My problem is that I have the next Local XML file in "x"-path:

 

(Login.xml)

 

<?xml version=”1.0??>
<Login>
     <URL>xxx</URL>
     <User>yyy</User>
     <Password>zzz</Password>
</Login>

 

These are some Values for the Login of the WepPage that Im testing. I need a Solution to read this xml.file values and use them later using the "user-extensions.js".


Can somebody help please.


Thanks

chaco

Jonathan McBrien Beginner 31 posts since
Aug 9, 2006
Currently Being Moderated
1. Oct 24, 2008 11:42 AM in response to: Cesar Arturo
Re: Read Local XML data Using Selenium IDE user-extensions.js

The datadriven extension I uploaded this week does exactly that, it may be of use to you.

 

http://wiki.openqa.org/display/SEL/datadriven

nicolas Beginner 1 posts since
Nov 21, 2008
Currently Being Moderated
4. Nov 21, 2008 9:28 AM in response to: Cesar Arturo
Re: Read Local XML data Using Selenium IDE user-extensions.js

Hi,

 

Yes there's a bug in FF3 (or a new security restriction)

 

 

Replace the line

 

      this.xmlDoc.load(xmlloc);

 

by:

 

        var xhr_object = null; 
        xhr_object = new XMLHttpRequest();
        xhr_object.open("GET", xmlloc, false);
        xhr_object.send(null);
        this.xmlDoc=xhr_object.responseXML;

 

 

it worked fine for me

 

 

Nicolas

QA Tester Beginner 1 posts since
Dec 8, 2008
Currently Being Moderated
5. Dec 8, 2008 6:23 AM in response to: nicolas
Re: Read Local XML data Using Selenium IDE user-extensions.js

Hi,

 

I've looked at all the comments above and have managed to resolve the problems as posted above.

However I'm receiving the following?

 

[error] Unexpected Exception: message -> No while statements found., fileName -> chrome://selenium-ide/content/tools.js -> file:///C:/goto.js, lineNumber -> 249, stack -> Error("No while statements found.")@:0 gotoWhile("","")@chrome://selenium-ide/content/tools.js -> file:///C:/goto.js:249 ("","")@chrome://selenium-ide/content/selenium/scripts/htmlutils.js:60 ([object Object],[object Object])@chrome://selenium-ide/content/selenium/scripts/selenium-commandhandlers.js:309 ()@chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js:112 (109)@chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js:78 (109)@chrome://selenium-ide/content/selenium/scripts/htmlutils.js:60 , name -> Error

 

Any help will be greatly appreciated.

Thanks.

Jane Beginner 4 posts since
Dec 30, 2008
Currently Being Moderated
6. Dec 30, 2008 4:25 PM in response to: QA Tester
Re: Read Local XML data Using Selenium IDE user-extensions.js

I am also having issues with the extension as well, this is the error I'm getting:

 

Failed to load user-extensions.js!
files=C:\\tests\\user-extensions.js, C:\tests\goto_sel08.js+, C:\tests\datadriven.js
lineNumber=231
error=ReferenceError: HtmlRunnerTestLoop is not defined

Jonathan McBrien Beginner 31 posts since
Aug 9, 2006
Currently Being Moderated
7. Feb 16, 2009 4:43 AM in response to: Jane
Re: Read Local XML data Using Selenium IDE user-extensions.js

Hi all.

 

I've uploaded an update to this extension and its documentation which I hope will resolve the issues that some of you have had.

 

Constructive feedback is appreciated, as always.

 

With thanks,

Jonathan McBrien

More Like This

  • Retrieving data ...