ReadInnerHTMLAsBody option
This commit is contained in:
parent
7033ec2484
commit
468f84981c
|
|
@ -43,4 +43,6 @@ public class PageActionArgs
|
|||
/// Wait time in seconds after page is opened
|
||||
/// </summary>
|
||||
public int WaitTime { get; set; }
|
||||
|
||||
public bool ReadInnerHTMLAsBody { get; set; } = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,9 +67,13 @@ public partial class PlaywrightWebDriver
|
|||
result.ResponseStatusCode = response.Status;
|
||||
if (response.Status == 200)
|
||||
{
|
||||
// Disable this due to performance issue, some page is too large
|
||||
// result.Body = await page.InnerHTMLAsync("body");
|
||||
result.IsSuccess = true;
|
||||
|
||||
// Be careful if page is too large, it will cause performance issue
|
||||
if (args.ReadInnerHTMLAsBody)
|
||||
{
|
||||
result.Body = await page.InnerHTMLAsync("body");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue