Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
abhayshankar
Posts : 6
Join date : 2012-02-13
Age : 37
Location : Bangalore

user-extensions.js file is needed Empty user-extensions.js file is needed

Wed Feb 22, 2012 8:35 pm
I am doing data driven testing using selenium IDE.for that i want user-extensions.js file.
Someone please help me to get that file.
avatar
faramka
Professional
Professional
Posts : 143
Join date : 2011-09-15
Location : Poland

user-extensions.js file is needed Empty Re: user-extensions.js file is needed

Wed Feb 22, 2012 8:42 pm
http://code.google.com/p/selenium-fasttrack/downloads/detail?name=user-extensions.js&can=2&q=
avatar
abhayshankar
Posts : 6
Join date : 2012-02-13
Age : 37
Location : Bangalore

user-extensions.js file is needed Empty Re: user-extensions.js file is needed

Thu Feb 23, 2012 12:51 pm
Hi,thanks for reply.Now i am getting this error.---->
Failed to load user-extensions.js!
files=/home/abhay/Desktop/S-IDE/datadriven_v0.2/user-extensions.js
lineNumber=64
error=SyntaxError: syntax error
avatar
zlos7ar
Amateur
Amateur
Posts : 41
Join date : 2012-01-13
Age : 36
Location : Germany

user-extensions.js file is needed Empty Re: user-extensions.js file is needed

Thu Feb 23, 2012 7:50 pm
the file has an error on line 64 you have to fix it or create a new post on the forum and paste the broken code there and maybe someone can help you then Smile
avatar
abhayshankar
Posts : 6
Join date : 2012-02-13
Age : 37
Location : Bangalore

user-extensions.js file is needed Empty Re: user-extensions.js file is needed

Thu Feb 23, 2012 8:35 pm
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;

}


function xmlTestData() {

this.xmlDoc = null;

this.testdata = null;

this.testRepeatCount= 0;

this.dataFilePath="file:///home/abhay/Desktop/S-IDE/datadriven_v0.2/TestData.xml";

this.index = null;

}



http://xmlTestData.prototype.load = function(xmlloc) {

loader = new IDEIncludeCommand();

var xmlHttpReq = loader.getIncludeDocumentBySynchronRequest(xmlloc);

this.xmlDoc = xmlHttpReq.responseXML;


this.index = 0;

this.testdata = this.xmlDoc.getElementsByTagName("test");


if (this.testdata == null || this.testdata.length == 0) {

throw new Error("Test data couldn't be loaded or test data was empty.");

}

}


xmlTestData.prototype.EOF = function() {

if (this.index != null && this.index < this.testdata.length) return false;

return true;

}


xmlTestData.prototype.more = function() {

return !this.EOF();

}


xmlTestData.prototype.next = function() {

if (this.EOF()) {

LOG.error("No test data.");

return;

}


LOG.info(XML.serialize(this.testdata[this.index])); // Log should anything go wrong while testing with this data.


if (this.testdata[this.index].attributes.length != this.testdata[0].attributes.length) {

LOG.error("Inconsistent attribute length in test data.");

return;

}


for (i=0; i
if (null == this.testdata[0].getAttribute(this.testdata[this.index].attributes[i].nodeName)) {

LOG.error("Inconsistent attribute names in test data.");

return;

}


selenium.doStore(this.testdata[this.index].attributes[i].nodeValue, this.testdata[this.index].attributes[i].nodeName);

}


this.index++;

}


Selenium.prototype.testdata = null;


Selenium.prototype.doLoadTestData = function(xmlloc) {

testdata = new xmlTestData();

testdata.load(xmlloc);

};


Selenium.prototype.doNextTestData = function() {

testdata.next();

};
Sponsored content

user-extensions.js file is needed Empty Re: user-extensions.js file is needed

Back to top
Permissions in this forum:
You cannot reply to topics in this forum