froth-webdriverio-framework 1.0.71 → 1.0.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,6 +12,8 @@ async function getBSBuildDetails(sessiontype, bs_username, bs_pwd) {
|
|
|
12
12
|
|
|
13
13
|
const url = `https://api.browserstack.com/${sessiontype}/builds.json?name=${process.env.BROWSERSTACK_BUILD_NAME}`;
|
|
14
14
|
|
|
15
|
+
console.log("url:" + url)
|
|
16
|
+
|
|
15
17
|
const response = await fetch(url, {
|
|
16
18
|
method: 'GET',
|
|
17
19
|
headers: {
|
|
@@ -21,11 +23,11 @@ async function getBSBuildDetails(sessiontype, bs_username, bs_pwd) {
|
|
|
21
23
|
|
|
22
24
|
if (response.ok) {
|
|
23
25
|
const data = await response.json();
|
|
24
|
-
|
|
26
|
+
console.log("session build_data:"+data)
|
|
25
27
|
// Accessing the public_url property
|
|
26
28
|
hashed_id = data.automation_build.hashed_id;
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
return hashed_id;
|
|
29
31
|
} else if (response.status === 401) { //
|
|
30
32
|
console.log("Unauthorized, token expired")
|
|
31
33
|
|
|
@@ -48,13 +50,13 @@ async function getBSBuildDetails(sessiontype, bs_username, bs_pwd) {
|
|
|
48
50
|
async function getBSSessionDetails(sessiontype, bs_username, bs_pwd) {
|
|
49
51
|
try {
|
|
50
52
|
// const sessionId = sessionIdd;
|
|
51
|
-
console.log(bs_username, bs_pwd)
|
|
52
53
|
const username = bs_username;
|
|
53
54
|
const accessKey = Buffer.from(bs_pwd, 'base64').toString('utf-8');
|
|
54
55
|
const basicAuth = btoa(`${username}:${accessKey}`);
|
|
55
56
|
|
|
56
57
|
const hash_id = await getBSBuildDetails(sessiontype, bs_username, accessKey)
|
|
57
58
|
// const sessionid = BUFFER.getItem("SESSION_ID");
|
|
59
|
+
console.log("hash_id"+hash_id)
|
|
58
60
|
|
|
59
61
|
// const url = `https://api.browserstack.com/${sessiontype}/sessions/${sessionid}.json`;
|
|
60
62
|
const url = `https://api.browserstack.com/${sessiontype}/builds/${hash_id}/sessions.json`;
|