Skip to content

Commit eb210f5

Browse files
Added local conf file
1 parent 063f5d7 commit eb210f5

16 files changed

+569
-30
lines changed

fixtures.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const clientPlaywrightVersion = cp
55
.toString()
66
.trim()
77
.split(' ')[1];
8-
// const BrowserStackLocal = require('browserstack-local');
8+
const BrowserStackLocal = require('browserstack-local');
99

1010
// BrowserStack Specific Capabilities.
1111
const caps = {
@@ -17,16 +17,16 @@ const caps = {
1717
'browserstack.username': process.env.BROWSERSTACK_USERNAME || 'YOUR_USERNAME',
1818
'browserstack.accessKey':
1919
process.env.BROWSERSTACK_ACCESS_KEY || 'YOUR_ACCESS_KEY',
20-
// 'browserstack.local': process.env.BROWSERSTACK_LOCAL || false,
20+
'browserstack.local': process.env.BROWSERSTACK_LOCAL || false,
2121
'client.playwrightVersion': clientPlaywrightVersion,
2222
};
2323

24-
// exports.bsLocal = new BrowserStackLocal.Local();
24+
exports.bsLocal = new BrowserStackLocal.Local();
2525

2626
// 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+
};
3030

3131
// Patching the capabilities dynamically according to the project name.
3232
const patchCaps = (name, title) => {
@@ -49,7 +49,7 @@ const isHash = (entity) => Boolean(entity && typeof (entity) === "object" && !Ar
4949
const nestedKeyValue = (hash, keys) => keys.reduce((hash, key) => (isHash(hash) ? hash[key] : undefined), hash);
5050

5151
exports.test = base.test.extend({
52-
page: async ({ page, browser, playwright }, use, testInfo) => {
52+
page: async ({ page, playwright }, use, testInfo) => {
5353
// Use BrowserStack Launched Browser according to capabilities for cross-browser testing.
5454
if (testInfo.project.name.match(/browserstack/)) {
5555
page.close()

local.log

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
3+
Fri Feb 04 2022 02:16:42 GMT+0530 (IST) -- [INFO] Started the BrowserStack Binary server on 45691, PID: 42549
4+
Fri Feb 04 2022 02:16:44 GMT+0530 (IST) -- [SUCCESS] You can now access your local server(s) in our remote browser
5+
6+
Fri Feb 04 2022 02:16:45 GMT+0530 (IST) -- Press Ctrl-C to exit
7+
8+

0 commit comments

Comments
 (0)