Module10-UserFuncs to load xml: 3 minor questions | Selenium Forum
M
Posted on 17/06/2016
This is regarding your user function to load xml. The relevant code is in this message.

1. In Selenium.prototype.doLoadTestData, you use
xmlTestData() instead of
XmlTestData()?
Was it intentional? If so why?
(I thought it is a constructor).

2. After the definition for doLoadTestData function, there is a semi-colon (;). Is it intentional?

3. In xmlTestData() function, I think that this.testdata is not being used. Am I correct?

[If your answers are not what I expect, I need to rethink my assumptions, hence the questions]
------------------------------------------------------------
Here is the relevant snippet:
Selenium.prototype.testdata = null;

Selenium.prototype.doLoadTestData = function(testName) {
testdata = new xmlTestData();
testdata.load(testName);
};

function xmlTestData() {
this.xmlDoc = null;
this.testdata = null;
this.testRepeatCount= 0;
this.dataFilePath="file:///C:/<path>/<xmlfile>.xml
this.testName=null;
}

M
Replied on 22/06/2016

are you still having the problem.