diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Enums/BroswerActionEnum.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Enums/BroswerActionEnum.cs index 6dd0fb63..f06acc82 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Browsing/Enums/BroswerActionEnum.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Enums/BroswerActionEnum.cs @@ -4,4 +4,5 @@ public enum BroswerActionEnum { Click = 1, InputText = 2, + Typing = 3, } diff --git a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/MessageInfo.cs b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/MessageInfo.cs index a39e97db..b273749f 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/MessageInfo.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/MessageInfo.cs @@ -7,5 +7,5 @@ public class MessageInfo public string ContextId { get; set; } = null!; public string? MessageId { get; set; } public string? TaskId { get; set; } - public int StepNum { get; set; } + public string StepId { get; set; } = Guid.NewGuid().ToString(); } diff --git a/src/Infrastructure/BotSharp.OpenAPI/Controllers/UserController.cs b/src/Infrastructure/BotSharp.OpenAPI/Controllers/UserController.cs index 9012e0d1..f0ab46ad 100644 --- a/src/Infrastructure/BotSharp.OpenAPI/Controllers/UserController.cs +++ b/src/Infrastructure/BotSharp.OpenAPI/Controllers/UserController.cs @@ -95,12 +95,14 @@ public class UserController : ControllerBase return UserViewModel.FromUser(user); } + [AllowAnonymous] [HttpGet("/user/name/existing")] public async Task VerifyUserNameExisting([FromQuery] string userName) { return await _userService.VerifyUserNameExisting(userName); } + [AllowAnonymous] [HttpGet("/user/email/existing")] public async Task VerifyEmailExisting([FromQuery] string email) { diff --git a/src/Plugins/BotSharp.Plugin.WebDriver/Drivers/PlaywrightDriver/PlaywrightWebDriver.DoAction.cs b/src/Plugins/BotSharp.Plugin.WebDriver/Drivers/PlaywrightDriver/PlaywrightWebDriver.DoAction.cs index 91a99aa8..60bd4139 100644 --- a/src/Plugins/BotSharp.Plugin.WebDriver/Drivers/PlaywrightDriver/PlaywrightWebDriver.DoAction.cs +++ b/src/Plugins/BotSharp.Plugin.WebDriver/Drivers/PlaywrightDriver/PlaywrightWebDriver.DoAction.cs @@ -34,5 +34,13 @@ public partial class PlaywrightWebDriver await locator.PressAsync(action.PressKey); } } + else if (action.Action == BroswerActionEnum.Typing) + { + await locator.PressSequentiallyAsync(action.Content); + if (action.PressKey != null) + { + await locator.PressAsync(action.PressKey); + } + } } }