Reputation: 14470
I have just updated my firefox to v 20.0. Whenever I open Selenium IDE in firefox , it show a popup error .
Failed to load user-extensions.js file=[PATH to file ...]datadriven_v0.2/datadriven.js lineNumber=37 error=ReferenceError:XML is not defined
.
The reported line in the file is sth like this :
XML.serialize = function(node) {
if (typeof XMLSerializer != "undefined")
return (new XMLSerializer()).serializeToString(node) ;
else if (node.xml) return node.xml;
else throw "XML.serialize is not supported or can't serialize " + node;
}
I do not know any thing specific to selenium IDE ,if XML is part of Selenium IDE or firefox . However, it seems latest updates to Firefox has sth to do.
I ll appreciate if someone help me fix this issue.
Upvotes: 0
Views: 3593
Reputation: 11
I am posting this for anyone using sel-blocks; the above solutions don't seem to work, since sel-blocks is an add-on and not a user-extension. However, there is still a solution. I added the line suggested above:
var XML = {};
to this file instead:
xmlextras.js
This file can be found in (selenium extension folder)/chrome/content/selenium-core/scripts
If you aren't sure how to get to your selenium extension folder, roughly here is how:
C:\Users(your username)\AppData\Roaming\Mozilla\Firefox\Profiles(your firefox profile)\extensions{a6fd85ed-e919-4a43-a5af-8da18bda539f}
I apologize if I'm not using the correct format for posting an answer or anything, but I just want to make sure that anyone searching for the answer I was looking for is able to find something.
Upvotes: 1
Reputation: 11
Sven's idea worked perfectly for me. I added the command
var XML = {};
to the beginning of my user-extensions.js file, closed FF and Selenium, and restarted them. They've been working perfectly since then. I'm up to FF v21.0 with no problems.
Thanks Sven!
Upvotes: 1
Reputation: 46
You can fix this by declaring the XML-Object in datadriven.js before it is called.
var XML = {};
XML.serialize = function(node) {
if (typeof XMLSerializer != "undefined")
return (new XMLSerializer()).serializeToString(node) ;
else if (node.xml) return node.xml;
else throw "XML.serialize is not supported or can't serialize " + node;
}
I don't know if this has any side effects, but for me it works.
Upvotes: 3
Reputation: 793
From checking the Selenium website, the latest version of SIDE only supports up to Firefox version 17.
https://code.google.com/p/selenium/wiki/SeIDEReleaseNotes
Upvotes: -1