Skip to content

Commit 2cd6601

Browse files
committed
win bug fixes
1 parent dd69c9b commit 2cd6601

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

win/run.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ try {
9393
Log-Line "========================================" $NOW_RUN_LOG_FILE
9494
Log-Line "Error: $($_.Exception.Message)" $NOW_RUN_LOG_FILE
9595
Log-Line "Check logs for details:" $NOW_RUN_LOG_FILE
96-
Log-Line " Global: $NOW_RUN_LOG_FILE" $NOW_RUN_LOG_FILE
97-
Log-Line " Web: $WEB_LOG" $NOW_RUN_LOG_FILE
98-
Log-Line " Mobile: $MOBILE_LOG" $NOW_RUN_LOG_FILE
96+
Log-Line " Log File: $NOW_RUN_LOG_FILE" $NOW_RUN_LOG_FILE
9997
Log-Line "========================================" $NOW_RUN_LOG_FILE
10098
throw
10199
}

win/user-interaction.ps1

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -162,21 +162,21 @@ function Ask-BrowserStack-Credentials {
162162
if ([string]::IsNullOrWhiteSpace($script:BROWSERSTACK_USERNAME) -or [string]::IsNullOrWhiteSpace($script:BROWSERSTACK_ACCESS_KEY)) {
163163
throw "BROWSERSTACK_USERNAME / BROWSERSTACK_ACCESS_KEY must be provided in silent/debug mode."
164164
}
165-
Log-Line "✅ BrowserStack credentials loaded from environment for user: $script:BROWSERSTACK_USERNAME" $GLOBAL_LOG
165+
Log-Line "✅ BrowserStack credentials loaded from environment for user: $script:BROWSERSTACK_USERNAME" $NOW_RUN_LOG_FILE
166166
return
167167
}
168168

169169
$script:BROWSERSTACK_USERNAME = Show-InputBox -Title "BrowserStack Setup" -Prompt "Enter your BrowserStack Username:`n`nLocate it on https://www.browserstack.com/accounts/profile/details" -DefaultText ""
170170
if ([string]::IsNullOrWhiteSpace($script:BROWSERSTACK_USERNAME)) {
171-
Log-Line "❌ Username empty" $GLOBAL_LOG
171+
Log-Line "❌ Username empty" $NOW_RUN_LOG_FILE
172172
throw "Username is required"
173173
}
174174
$script:BROWSERSTACK_ACCESS_KEY = Show-PasswordBox -Title "BrowserStack Setup" -Prompt "Enter your BrowserStack Access Key:`n`nLocate it on https://www.browserstack.com/accounts/profile/details"
175175
if ([string]::IsNullOrWhiteSpace($script:BROWSERSTACK_ACCESS_KEY)) {
176-
Log-Line "❌ Access Key empty" $GLOBAL_LOG
176+
Log-Line "❌ Access Key empty" $NOW_RUN_LOG_FILE
177177
throw "Access Key is required"
178178
}
179-
Log-Line "✅ BrowserStack credentials captured (access key hidden)" $GLOBAL_LOG
179+
Log-Line "✅ BrowserStack credentials captured (access key hidden)" $NOW_RUN_LOG_FILE
180180
}
181181

182182
function Resolve-Test-Type {
@@ -197,7 +197,7 @@ function Resolve-Test-Type {
197197
-DefaultChoice "Web"
198198
if ([string]::IsNullOrWhiteSpace($choice)) { throw "No testing type selected" }
199199
$script:TEST_TYPE = $choice
200-
Log-Line "✅ Selected Testing Type: $script:TEST_TYPE" $GLOBAL_LOG
200+
Log-Line "✅ Selected Testing Type: $script:TEST_TYPE" $NOW_RUN_LOG_FILE
201201
}
202202

203203
function Resolve-Tech-Stack {
@@ -219,7 +219,7 @@ function Resolve-Tech-Stack {
219219
-DefaultChoice "Java"
220220
if ([string]::IsNullOrWhiteSpace($choice)) { throw "No tech stack selected" }
221221
$script:TECH_STACK = $choice
222-
Log-Line "✅ Selected Tech Stack: $script:TECH_STACK" $GLOBAL_LOG
222+
Log-Line "✅ Selected Tech Stack: $script:TECH_STACK" $NOW_RUN_LOG_FILE
223223
}
224224

225225
function Ask-User-TestUrl {
@@ -232,9 +232,9 @@ function Ask-User-TestUrl {
232232
$testUrl = Show-InputBox -Title "Test URL Setup" -Prompt "Enter the URL you want to test with BrowserStack:`n(Leave blank for default: $DEFAULT_TEST_URL)" -DefaultText ""
233233
if ([string]::IsNullOrWhiteSpace($testUrl)) {
234234
$testUrl = $DEFAULT_TEST_URL
235-
Log-Line "⚠️ No URL entered. Falling back to default: $testUrl" $GLOBAL_LOG
235+
Log-Line "⚠️ No URL entered. Falling back to default: $testUrl" $NOW_RUN_LOG_FILE
236236
} else {
237-
Log-Line "🌐 Using custom test URL: $testUrl" $GLOBAL_LOG
237+
Log-Line "🌐 Using custom test URL: $testUrl" $NOW_RUN_LOG_FILE
238238
}
239239
$script:CX_TEST_URL = $testUrl
240240
}
@@ -321,7 +321,7 @@ function Ask-And-Upload-App {
321321
return
322322
}
323323
$result = Invoke-SampleAppUpload
324-
Log-Line "⚠️ Using auto-uploaded sample app: $($result.Url)" $GLOBAL_LOG
324+
Log-Line "⚠️ Using auto-uploaded sample app: $($result.Url)" $NOW_RUN_LOG_FILE
325325
$script:APP_URL = $result.Url
326326
$script:APP_PLATFORM = $result.Platform
327327
return
@@ -330,7 +330,7 @@ function Ask-And-Upload-App {
330330
$choice = Show-OpenOrSampleAppDialog
331331
if ([string]::IsNullOrWhiteSpace($choice) -or $choice -eq "Sample App") {
332332
$result = Invoke-SampleAppUpload
333-
Log-Line "⚠️ Using sample app: $($result.Url)" $GLOBAL_LOG
333+
Log-Line "⚠️ Using sample app: $($result.Url)" $NOW_RUN_LOG_FILE
334334
$script:APP_URL = $result.Url
335335
$script:APP_PLATFORM = $result.Platform
336336
return
@@ -339,7 +339,7 @@ function Ask-And-Upload-App {
339339
$path = Show-OpenFileDialog -Title "📱 Select your .apk or .ipa file" -Filter "App Files (*.apk;*.ipa)|*.apk;*.ipa|All files (*.*)|*.*"
340340
if ([string]::IsNullOrWhiteSpace($path)) {
341341
$result = Invoke-SampleAppUpload
342-
Log-Line "⚠️ No app selected. Using sample app: $($result.Url)" $GLOBAL_LOG
342+
Log-Line "⚠️ No app selected. Using sample app: $($result.Url)" $NOW_RUN_LOG_FILE
343343
$script:APP_URL = $result.Url
344344
$script:APP_PLATFORM = $result.Platform
345345
return
@@ -348,7 +348,7 @@ function Ask-And-Upload-App {
348348
$result = Invoke-CustomAppUpload -FilePath $path
349349
$script:APP_URL = $result.Url
350350
$script:APP_PLATFORM = $result.Platform
351-
Log-Line "✅ App uploaded successfully: $($result.Url)" $GLOBAL_LOG
351+
Log-Line "✅ App uploaded successfully: $($result.Url)" $NOW_RUN_LOG_FILE
352352
}
353353

354354
# ===== Perform next steps based on test type (like Mac's perform_next_steps_based_on_test_type) =====

0 commit comments

Comments
 (0)