Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BugFix - 42091 - Added check for 0,0 Viewport Size #3882

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ private void ThrowIfClosed()
}

byte[] screenshot;
if (fullPage)
if (fullPage)
{
screenshot = await tab.ScreenshotAsync();
}
Expand Down Expand Up @@ -1574,6 +1574,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
Loading