Skip to content

Commit 8cb29b1

Browse files
author
jason
committed
use IHttpClientFactory
1 parent 97e0b68 commit 8cb29b1

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,4 @@ public class ElementLocatingArgs
3636
/// </summary>
3737
public bool Highlight { get; set; }
3838
public string HighlightColor { get; set; } = "red";
39-
public bool IsImage { get; set; }
4039
}

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,6 @@ public async Task<BrowserActionResult> LocateElement(MessageInfo message, Elemen
1717
ILocator locator = page.Locator("body");
1818
int count = 0;
1919

20-
if (location.IsImage)
21-
{
22-
var handle = await page.QuerySelectorAsync("img");
23-
byte[]? imageBytes = handle != null ? await handle.ScreenshotAsync() : null;
24-
string? body = null;
25-
if (imageBytes?.Any() == true)
26-
{
27-
body = Convert.ToBase64String(imageBytes);
28-
}
29-
return new BrowserActionResult { IsSuccess = true, Body = body };
30-
}
31-
3220
// check if selector is specified
3321
if (location.Selector != null)
3422
{

0 commit comments

Comments
 (0)