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

16 lines
497 B
C#
Raw Normal View History

2024-03-08 13:17:36 +00:00
namespace BotSharp.Plugin.WebDriver.Drivers.PlaywrightDriver;
public partial class PlaywrightWebDriver
{
public async Task<BrowserActionResult> ActionOnElement(MessageInfo message, ElementLocatingArgs location, ElementActionArgs action)
{
await _instance.Wait(message.ConversationId);
var result = await LocateElement(message, location);
if (result.IsSuccess)
{
await DoAction(message, action, result);
}
return result;
}
}