Robustify interactive browser
Too small window sizes make the test unstable. Now it works reliably in a loop.
This commit is contained in:
parent
6cd41a5cc5
commit
5b31add62f
1 changed files with 3 additions and 0 deletions
3
bidi.py
3
bidi.py
|
|
@ -116,6 +116,9 @@ class WebdriverBidi:
|
||||||
else:
|
else:
|
||||||
raise WebdriverError("timed out waiting for default realm")
|
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):
|
async def __aenter__(self):
|
||||||
await self.start_session()
|
await self.start_session()
|
||||||
return self
|
return self
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue