category
This commit is contained in:
parent
780718ef97
commit
78f5cd1751
|
|
@ -1,5 +1,8 @@
|
|||
using System.Diagnostics;
|
||||
|
||||
namespace BotSharp.Abstraction.Browsing.Models;
|
||||
|
||||
[DebuggerStepThrough]
|
||||
public class ElementLocatingArgs
|
||||
{
|
||||
[JsonPropertyName("match_rule")]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
using System.Diagnostics;
|
||||
|
||||
namespace BotSharp.Abstraction.Browsing.Models;
|
||||
|
||||
[DebuggerStepThrough]
|
||||
public class WebPageResponseFilter
|
||||
{
|
||||
public string Url { get; set; } = null!;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue