Skip to content

Commit cc44845

Browse files
authored
Merge pull request #17 from Qtoss-AI/Issues-321
Issues-321
2 parents 15fbf98 + dcd3fc5 commit cc44845

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Infrastructure/BotSharp.Abstraction/Browsing/Models/BrowserActionResult.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ namespace BotSharp.Abstraction.Browsing.Models;
22

33
public class BrowserActionResult
44
{
5+
public int ResponseStatusCode { get; set; }
56
public bool IsSuccess { get; set; }
67
public string? Message { get; set; }
78
public string? StackTrace { get; set; }

src/Plugins/BotSharp.Plugin.WebDriver/Drivers/PlaywrightDriver/PlaywrightWebDriver.GoToPage.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,15 @@ await _instance.NewPage(message, enableResponseCallback: args.EnableResponseCall
6464
await Task.Delay(args.WaitTime * 1000);
6565
}
6666

67+
result.ResponseStatusCode = response.Status;
6768
if (response.Status == 200)
6869
{
6970
// Disable this due to performance issue, some page is too large
7071
// result.Body = await page.InnerHTMLAsync("body");
7172
result.IsSuccess = true;
7273
}
7374
else
74-
{
75+
{
7576
result.Message = response.StatusText;
7677
}
7778
}

0 commit comments

Comments
 (0)