@@ -5,7 +5,7 @@ const clientPlaywrightVersion = cp
5
5
. toString ( )
6
6
. trim ( )
7
7
. split ( ' ' ) [ 1 ] ;
8
- // const BrowserStackLocal = require('browserstack-local');
8
+ const BrowserStackLocal = require ( 'browserstack-local' ) ;
9
9
10
10
// BrowserStack Specific Capabilities.
11
11
const caps = {
@@ -17,16 +17,16 @@ const caps = {
17
17
'browserstack.username' : process . env . BROWSERSTACK_USERNAME || 'YOUR_USERNAME' ,
18
18
'browserstack.accessKey' :
19
19
process . env . BROWSERSTACK_ACCESS_KEY || 'YOUR_ACCESS_KEY' ,
20
- // 'browserstack.local': process.env.BROWSERSTACK_LOCAL || false,
20
+ 'browserstack.local' : process . env . BROWSERSTACK_LOCAL || false ,
21
21
'client.playwrightVersion' : clientPlaywrightVersion ,
22
22
} ;
23
23
24
- // exports.bsLocal = new BrowserStackLocal.Local();
24
+ exports . bsLocal = new BrowserStackLocal . Local ( ) ;
25
25
26
26
// replace YOUR_ACCESS_KEY with your key. You can also set an environment variable - "BROWSERSTACK_ACCESS_KEY".
27
- // exports.BS_LOCAL_ARGS = {
28
- // key: process.env.BROWSERSTACK_ACCESS_KEY || 'YOUR_ACCESS_KEY',
29
- // };
27
+ exports . BS_LOCAL_ARGS = {
28
+ key : process . env . BROWSERSTACK_ACCESS_KEY || 'YOUR_ACCESS_KEY' ,
29
+ } ;
30
30
31
31
// Patching the capabilities dynamically according to the project name.
32
32
const patchCaps = ( name , title ) => {
@@ -49,7 +49,7 @@ const isHash = (entity) => Boolean(entity && typeof (entity) === "object" && !Ar
49
49
const nestedKeyValue = ( hash , keys ) => keys . reduce ( ( hash , key ) => ( isHash ( hash ) ? hash [ key ] : undefined ) , hash ) ;
50
50
51
51
exports . test = base . test . extend ( {
52
- page : async ( { page, browser , playwright } , use , testInfo ) => {
52
+ page : async ( { page, playwright } , use , testInfo ) => {
53
53
// Use BrowserStack Launched Browser according to capabilities for cross-browser testing.
54
54
if ( testInfo . project . name . match ( / b r o w s e r s t a c k / ) ) {
55
55
page . close ( )
0 commit comments