Commit 4ca0469f by 郁子恒

解决合并冲突

parents c0d4f2bd 7a129fd4
......@@ -14,9 +14,9 @@ function table () {
* 新生成一个单元格
* @param {any} xpath
*/
this.newCell = function (xpath, name, type, types,title) {
this.newCell = function (xpath, name, type, types, title) {
_isVerified = false;//加入了
let newCell = new cell(xpath, name, type,types, title);
let newCell = new cell(xpath, name, type, types, title);
this.cells.push(newCell);
}
/**
......@@ -102,7 +102,7 @@ function table () {
* @param {string} type 元素取值类型,文本,链接,元素路径(点击动作用)
* @param {string} title 标题信息
*/
function cell (xpath, name, type,types, title) {
function cell (xpath, name, type, types, title) {
/**当前单元格的绝对路径,存入Action时有用 */
this.xpath = xpath;
/**当前单元格存储数据时的属性名 */
......@@ -167,9 +167,10 @@ function cell (xpath, name, type,types, title) {
let cellXpath = this.tableXpath + "[" + index + "]" + '/' + this.relativeXpath;
let results = document.evaluate(cellXpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
if (!!results.singleNodeValue) {
// console.log(results)
if (this.type == 'xPath') {
result[this.name] = this.xpath
result[this.name] = xpath
} else if (this.type == '文本') {
result[this.name] = results.singleNodeValue['textContent'];
} else {
result[this.name] = results.singleNodeValue[this.type];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment