Skip to content

Commit

Permalink
Merge pull request #118 from why2lyj/master
Browse files Browse the repository at this point in the history
add set_geolocation_override
  • Loading branch information
ClericPy authored Feb 9, 2023
2 parents 7a047c9 + 46165cf commit ebe3a3e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ichrome/async_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2541,6 +2541,21 @@ async def browser_version(self, timeout=NotSet):
"[Browser.getVersion]"
return await self.send('Browser.getVersion', timeout=timeout)

async def set_geolocation_override(self,
latitude: Optional[int] = None,
longitude: Optional[int] = None,
accuracy: Optional[int] = None,
timeout=NotSet):
logger.debug(f'[set_geolocation_override] {self!r} latitude => {latitude}')
logger.debug(f'[set_geolocation_override] {self!r} longitude => {longitude}')
logger.debug(f'[set_geolocation_override] {self!r} accuracy => {accuracy}')
data = await self.send('Emulation.setGeolocationOverride',
latitude=latitude,
longitude=longitude,
accuracy=accuracy,
timeout=timeout)
return data


class OffsetMoveWalker:
__slots__ = ('path', 'start_x', 'start_y', 'tab', 'timeout')
Expand Down

0 comments on commit ebe3a3e

Please sign in to comment.