Skip to content

Commit d041d42

Browse files
committed
UrlAfterAction
1 parent 67d4342 commit d041d42

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ public class BrowserActionResult
88
public string? StackTrace { get; set; }
99
public string? Selector { get; set; }
1010
public string? Body { get; set; }
11+
/// <summary>
12+
/// Page open in new tab after button click
13+
/// </summary>
14+
public string? UrlAfterAction { get; set; }
1115
public bool IsHighlighted { get; set; }
1216

1317
public override string ToString()

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public async Task<BrowserActionResult> ActionOnElement(MessageInfo message, Elem
99
if (result.IsSuccess)
1010
{
1111
await DoAction(message, action, result);
12+
result.UrlAfterAction = _instance.GetPage(message.ContextId)?.Url;
1213
}
1314
return result;
1415
}

0 commit comments

Comments
 (0)