Skip to content

Commit

Permalink
Merge branch 'Releases/Beta' into BugFix/42099-AccessibilityBugFixPla…
Browse files Browse the repository at this point in the history
…ywright
  • Loading branch information
IamRanjeetSingh committed Aug 28, 2024
2 parents 7a3d19f + 7d1d3d3 commit ef5d363
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ private void ThrowIfClosed()
}
byte[] screenshot;
if (fullPage)
if (fullPage)
{
screenshot = await tab.ScreenshotAsync();
}
Expand Down Expand Up @@ -1586,6 +1586,11 @@ public VisualElementsInfo GetVisualElementsInfo()
public void ChangeAppWindowSize(int width, int height)
{
ThrowIfClosed();
if (width <= 0 || height <= 0)
{
//for VRT action, it passes widht and height as 0 to maximize which causes issues with Playwright, so ignoring those
return;
}
Size size = new(width, height);
Task.Run(() => _browser.CurrentWindow.CurrentTab.SetViewportSizeAsync(size).Wait()).Wait();
}
Expand Down

0 comments on commit ef5d363

Please sign in to comment.