Robustify interactive browser

Too small window sizes make the test unstable. Now it works reliably in
a loop.
This commit is contained in:
Martin Pitt 2024-07-23 08:35:18 +02:00
parent 6cd41a5cc5
commit 5b31add62f

View file

@ -116,6 +116,9 @@ class WebdriverBidi:
else:
raise WebdriverError("timed out waiting for default realm")
# avoid not seeing elements due to too small window
await self.bidi("browsingContext.setViewport", context=self.context, viewport={"width": 1024, "height": 5000})
async def __aenter__(self):
await self.start_session()
return self