1
1
const assert = require ( "assert" ) ;
2
2
const firefox = require ( 'selenium-webdriver/firefox' ) ;
3
- const { BrowsingContext, Builder} = require ( "selenium-webdriver" ) ;
3
+ const { BrowsingContext, ScriptManager , Builder} = require ( "selenium-webdriver" ) ;
4
4
const { Locator} = require ( "selenium-webdriver/bidi/browsingContext" ) ;
5
- const { LocalValue} = require ( "selenium-webdriver/bidi/protocolValue" ) ;
5
+ const { LocalValue, ReferenceValue } = require ( "selenium-webdriver/bidi/protocolValue" ) ;
6
6
const { ArgumentValue} = require ( "selenium-webdriver/bidi/argumentValue" ) ;
7
+ const { EvaluateResultType} = require ( "selenium-webdriver/bidi/evaluateResult" ) ;
7
8
8
9
describe ( 'Locate Nodes' , function ( ) {
9
10
let driver
@@ -19,7 +20,7 @@ describe('Locate Nodes', function () {
19
20
await driver . quit ( )
20
21
} )
21
22
22
- xit ( 'can locate nodes' , async function ( ) {
23
+ it ( 'can locate nodes' , async function ( ) {
23
24
const id = await driver . getWindowHandle ( )
24
25
const browsingContext = await BrowsingContext ( driver , {
25
26
browsingContextId : id ,
@@ -31,7 +32,7 @@ describe('Locate Nodes', function () {
31
32
assert . strictEqual ( element . length , 13 )
32
33
} )
33
34
34
- xit ( 'can locate node' , async function ( ) {
35
+ it ( 'can locate node' , async function ( ) {
35
36
const id = await driver . getWindowHandle ( )
36
37
const browsingContext = await BrowsingContext ( driver , {
37
38
browsingContextId : id ,
@@ -43,7 +44,7 @@ describe('Locate Nodes', function () {
43
44
assert . strictEqual ( element . type , 'node' )
44
45
} )
45
46
46
- xit ( 'can locate node with css locator' , async function ( ) {
47
+ it ( 'can locate node with css locator' , async function ( ) {
47
48
const id = await driver . getWindowHandle ( )
48
49
const browsingContext = await BrowsingContext ( driver , {
49
50
browsingContextId : id ,
@@ -60,7 +61,7 @@ describe('Locate Nodes', function () {
60
61
assert . notEqual ( element . sharedId , undefined )
61
62
} )
62
63
63
- xit ( 'can locate node with xpath locator' , async function ( ) {
64
+ it ( 'can locate node with xpath locator' , async function ( ) {
64
65
const id = await driver . getWindowHandle ( )
65
66
const browsingContext = await BrowsingContext ( driver , {
66
67
browsingContextId : id ,
@@ -94,7 +95,7 @@ describe('Locate Nodes', function () {
94
95
assert . notEqual ( element . sharedId , undefined )
95
96
} )
96
97
97
- xit ( 'can locate node with max node count' , async function ( ) {
98
+ it ( 'can locate node with max node count' , async function ( ) {
98
99
const id = await driver . getWindowHandle ( )
99
100
const browsingContext = await BrowsingContext ( driver , {
100
101
browsingContextId : id ,
@@ -106,7 +107,7 @@ describe('Locate Nodes', function () {
106
107
assert . strictEqual ( elements . length , 4 )
107
108
} )
108
109
109
- xit ( 'can locate node with none ownership value' , async function ( ) {
110
+ it ( 'can locate node with none ownership value' , async function ( ) {
110
111
const id = await driver . getWindowHandle ( )
111
112
const browsingContext = await BrowsingContext ( driver , {
112
113
browsingContextId : id ,
@@ -132,13 +133,13 @@ describe('Locate Nodes', function () {
132
133
assert . notEqual ( elements [ 0 ] . handle , null )
133
134
} )
134
135
135
- xit ( 'can locate node with given start nodes' , async function ( ) {
136
+ it ( 'can locate node with given start nodes' , async function ( ) {
136
137
const id = await driver . getWindowHandle ( )
137
138
const browsingContext = await BrowsingContext ( driver , {
138
139
browsingContextId : id ,
139
140
} )
140
141
141
- await driver . get ( Pages . formPage )
142
+ await driver . get ( 'https://www.selenium.dev/selenium/web/ formPage.html' )
142
143
143
144
const script = await ScriptManager ( id , driver )
144
145
@@ -170,7 +171,7 @@ describe('Locate Nodes', function () {
170
171
startNodes ,
171
172
)
172
173
173
- assert . strictEqual ( elements . length , 35 )
174
+ assert . strictEqual ( elements . length , 37 )
174
175
} )
175
176
176
177
xit ( 'can locate nodes in a given sandbox' , async function ( ) {
@@ -212,7 +213,7 @@ describe('Locate Nodes', function () {
212
213
assert . strictEqual ( sharedId . value , nodeId )
213
214
} )
214
215
215
- xit ( 'can find element' , async function ( ) {
216
+ it ( 'can find element' , async function ( ) {
216
217
const id = await driver . getWindowHandle ( )
217
218
const browsingContext = await BrowsingContext ( driver , {
218
219
browsingContextId : id ,
@@ -225,7 +226,7 @@ describe('Locate Nodes', function () {
225
226
assert . strictEqual ( elementText , 'Open new window' )
226
227
} )
227
228
228
- xit ( 'can find elements' , async function ( ) {
229
+ it ( 'can find elements' , async function ( ) {
229
230
const id = await driver . getWindowHandle ( )
230
231
const browsingContext = await BrowsingContext ( driver , {
231
232
browsingContextId : id ,
0 commit comments