scroll element into view for mouse actions

This works fine with Firefox, and conforms to the spec.

However, Chromium gets confused and clicks on the wrong position. Work
around that for now by keeping our old `ph_mouse()` event synthesizer
for Chromium.
This commit is contained in:
Martin Pitt 2024-07-26 16:13:10 +02:00
parent 9653a60fc2
commit 49317d7c19
3 changed files with 83 additions and 11 deletions

View file

@ -140,10 +140,6 @@ 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.top_context,
# viewport={"width": 1024, "height": 5000})
async def __aenter__(self):
await self.start_session()
return self