This commit is contained in:
Haiping Chen 2024-10-20 15:24:21 +00:00
parent 780718ef97
commit 78f5cd1751
3 changed files with 15 additions and 1 deletions

View file

@ -1,5 +1,8 @@
using System.Diagnostics;
namespace BotSharp.Abstraction.Browsing.Models;
[DebuggerStepThrough]
public class ElementLocatingArgs
{
[JsonPropertyName("match_rule")]

View file

@ -1,5 +1,8 @@
using System.Diagnostics;
namespace BotSharp.Abstraction.Browsing.Models;
[DebuggerStepThrough]
public class WebPageResponseFilter
{
public string Url { get; set; } = null!;

View file

@ -128,7 +128,15 @@ public partial class PlaywrightWebDriver
}
else
{
result.Selector = locator.ToString().Split("Locator@").Last();
foreach (var element in await locator.AllAsync())
{
var html = await element.InnerHTMLAsync();
_logger.LogWarning(html);
// fix if html has &
result.Body = HttpUtility.HtmlDecode(html);
break;
}
result.IsSuccess = true;
}
}