Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
Vue-WebDriver
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高源
Vue-WebDriver
Commits
4ca0469f
Commit
4ca0469f
authored
Nov 28, 2023
by
郁子恒
Browse files
Options
Browse Files
Download
Plain Diff
解决合并冲突
parents
c0d4f2bd
7a129fd4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
collectionTable.vue
src/components/collectionTable.vue
+0
-0
sdk-table.js
src/sdk-table.js
+6
-5
No files found.
src/components/collectionTable.vue
View file @
4ca0469f
This diff is collapsed.
Click to expand it.
src/sdk-table.js
View file @
4ca0469f
...
@@ -14,9 +14,9 @@ function table () {
...
@@ -14,9 +14,9 @@ function table () {
* 新生成一个单元格
* 新生成一个单元格
* @param {any} xpath
* @param {any} xpath
*/
*/
this
.
newCell
=
function
(
xpath
,
name
,
type
,
types
,
title
)
{
this
.
newCell
=
function
(
xpath
,
name
,
type
,
types
,
title
)
{
_isVerified
=
false
;
//加入了
_isVerified
=
false
;
//加入了
let
newCell
=
new
cell
(
xpath
,
name
,
type
,
types
,
title
);
let
newCell
=
new
cell
(
xpath
,
name
,
type
,
types
,
title
);
this
.
cells
.
push
(
newCell
);
this
.
cells
.
push
(
newCell
);
}
}
/**
/**
...
@@ -102,7 +102,7 @@ function table () {
...
@@ -102,7 +102,7 @@ function table () {
* @param {string} type 元素取值类型,文本,链接,元素路径(点击动作用)
* @param {string} type 元素取值类型,文本,链接,元素路径(点击动作用)
* @param {string} title 标题信息
* @param {string} title 标题信息
*/
*/
function
cell
(
xpath
,
name
,
type
,
types
,
title
)
{
function
cell
(
xpath
,
name
,
type
,
types
,
title
)
{
/**当前单元格的绝对路径,存入Action时有用 */
/**当前单元格的绝对路径,存入Action时有用 */
this
.
xpath
=
xpath
;
this
.
xpath
=
xpath
;
/**当前单元格存储数据时的属性名 */
/**当前单元格存储数据时的属性名 */
...
@@ -167,9 +167,10 @@ function cell (xpath, name, type,types, title) {
...
@@ -167,9 +167,10 @@ function cell (xpath, name, type,types, title) {
let
cellXpath
=
this
.
tableXpath
+
"["
+
index
+
"]"
+
'/'
+
this
.
relativeXpath
;
let
cellXpath
=
this
.
tableXpath
+
"["
+
index
+
"]"
+
'/'
+
this
.
relativeXpath
;
let
results
=
document
.
evaluate
(
cellXpath
,
document
,
null
,
XPathResult
.
FIRST_ORDERED_NODE_TYPE
,
null
);
let
results
=
document
.
evaluate
(
cellXpath
,
document
,
null
,
XPathResult
.
FIRST_ORDERED_NODE_TYPE
,
null
);
if
(
!!
results
.
singleNodeValue
)
{
if
(
!!
results
.
singleNodeValue
)
{
// console.log(results)
if
(
this
.
type
==
'xPath'
)
{
if
(
this
.
type
==
'xPath'
)
{
result
[
this
.
name
]
=
this
.
xpath
result
[
this
.
name
]
=
xpath
}
else
if
(
this
.
type
==
'文本'
)
{
result
[
this
.
name
]
=
results
.
singleNodeValue
[
'textContent'
];
}
else
{
}
else
{
result
[
this
.
name
]
=
results
.
singleNodeValue
[
this
.
type
];
result
[
this
.
name
]
=
results
.
singleNodeValue
[
this
.
type
];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment