File tree 3 files changed +10
-7
lines changed
javascript/selenium-webdriver/test/chrome 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 19
19
-//javascript/atoms:test-edge
20
20
-//javascript/atoms:test-firefox-beta
21
21
-//javascript/chrome-driver/...
22
- -//javascript/selenium-webdriver:test-bidi-network-test.js-chrome
23
22
-//javascript/selenium-webdriver:test-builder-test.js-chrome
24
- -//javascript/selenium-webdriver:test-builder-test.js-firefox
25
23
-//javascript/selenium-webdriver:test-chrome-devtools-test.js-chrome
26
- -//javascript/selenium-webdriver:test-chrome-options-test.js-chrome
27
24
-//javascript/selenium-webdriver:test-chrome-service-test.js-chrome
28
25
-//javascript/selenium-webdriver:test-firefox-options-test.js-firefox
29
26
-//javascript/selenium-webdriver:test-lib-capabilities-test.js-chrome
Original file line number Diff line number Diff line change @@ -34,7 +34,9 @@ test.suite(
34
34
let driver
35
35
36
36
beforeEach ( async function ( ) {
37
- driver = await env . builder ( ) . setChromeOptions ( new chrome . Options ( ) . addArguments ( '-headless' ) ) . build ( )
37
+ let options = env . builder ( ) . getChromeOptions ( ) || new chrome . Options ( )
38
+ options . addArguments ( '--headless' )
39
+ driver = await env . builder ( ) . setChromeOptions ( options ) . build ( )
38
40
} )
39
41
afterEach ( async ( ) => await driver . quit ( ) )
40
42
@@ -125,6 +127,7 @@ test.suite(
125
127
await driver . register ( 'random' , 'random' , pageCdpConnection )
126
128
await driver . get ( fileServer . Pages . basicAuth )
127
129
let source = await driver . getPageSource ( )
130
+ console . log ( source )
128
131
assert . strictEqual ( source . includes ( 'Access granted!' ) , false , source )
129
132
} )
130
133
} )
Original file line number Diff line number Diff line change @@ -123,7 +123,8 @@ test.suite(
123
123
124
124
describe ( 'Chrome options' , function ( ) {
125
125
it ( 'can start Chrome with custom args' , async function ( ) {
126
- const options = new chrome . Options ( ) . addArguments ( 'user-agent=foo;bar' )
126
+ const options = env . builder ( ) . getChromeOptions ( ) || new chrome . Options ( )
127
+ options . addArguments ( 'user-agent=foo;bar' )
127
128
128
129
driver = await env . builder ( ) . setChromeOptions ( options ) . build ( )
129
130
@@ -152,7 +153,8 @@ test.suite(
152
153
} )
153
154
154
155
it ( 'can install an extension from path' , async function ( ) {
155
- let options = new chrome . Options ( ) . addExtensions ( WEBEXTENSION_CRX )
156
+ let options = env . builder ( ) . getChromeOptions ( ) || new chrome . Options ( )
157
+ options . addExtensions ( WEBEXTENSION_CRX )
156
158
157
159
driver = await env . builder ( ) . forBrowser ( 'chrome' ) . setChromeOptions ( options ) . build ( )
158
160
@@ -161,7 +163,8 @@ test.suite(
161
163
} )
162
164
163
165
it ( 'can install an extension from Buffer' , async function ( ) {
164
- let options = new chrome . Options ( ) . addExtensions ( fs . readFileSync ( WEBEXTENSION_CRX ) )
166
+ let options = env . builder ( ) . getChromeOptions ( ) || new chrome . Options ( )
167
+ options . addExtensions ( fs . readFileSync ( WEBEXTENSION_CRX ) )
165
168
166
169
driver = await env . builder ( ) . forBrowser ( 'chrome' ) . setChromeOptions ( options ) . build ( )
167
170
You can’t perform that action at this time.
0 commit comments