|
@@ -134,10 +134,10 @@ class Client:
|
|
await asyncio.sleep(check_interval)
|
|
await asyncio.sleep(check_interval)
|
|
return self.waiting_javascript_commands.pop(request_id)
|
|
return self.waiting_javascript_commands.pop(request_id)
|
|
|
|
|
|
- def open(self, target: Union[Callable[..., Any], str]) -> None:
|
|
|
|
|
|
+ def open(self, target: Union[Callable[..., Any], str], new_tab: bool = False) -> None:
|
|
"""Open a new page in the client."""
|
|
"""Open a new page in the client."""
|
|
path = target if isinstance(target, str) else globals.page_routes[target]
|
|
path = target if isinstance(target, str) else globals.page_routes[target]
|
|
- outbox.enqueue_message('open', path, self.id)
|
|
|
|
|
|
+ outbox.enqueue_message('open', {'path': path, 'new_tab': new_tab}, self.id)
|
|
|
|
|
|
def download(self, url: str, filename: Optional[str] = None) -> None:
|
|
def download(self, url: str, filename: Optional[str] = None) -> None:
|
|
"""Download a file from the given URL."""
|
|
"""Download a file from the given URL."""
|