Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

user-extensions.js file is needed

View previous topic View next topic Go down

user-extensions.js file is needed

Post by abhayshankar on 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.

abhayshankar

Posts : 6
Join date : 2012-02-13
Age : 29
Location : Bangalore

Back to top Go down

Re: user-extensions.js file is needed

Post by faramka on Wed Feb 22, 2012 8:42 pm

http://code.google.com/p/selenium-fasttrack/downloads/detail?name=user-extensions.js&can=2&q=

faramka
Professional
Professional

Posts : 143
Join date : 2011-09-15
Location : Poland

Back to top Go down

Re: user-extensions.js file is needed

Post by abhayshankar on 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

abhayshankar

Posts : 6
Join date : 2012-02-13
Age : 29
Location : Bangalore

Back to top Go down

Re: user-extensions.js file is needed

Post by zlos7ar on 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

zlos7ar
Amateur
Amateur

Posts : 41
Join date : 2012-01-13
Age : 28
Location : Germany

Back to top Go down

Re: user-extensions.js file is needed

Post by abhayshankar on 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();

};

abhayshankar

Posts : 6
Join date : 2012-02-13
Age : 29
Location : Bangalore

Back to top Go down

Re: user-extensions.js file is needed

Post by Sponsored content Today at 7:27 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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