Update stubs

This commit is contained in:
Trinh Anh Ngoc
2023-05-29 18:11:37 +07:00
parent f4a7120fee
commit 7166cee540
4 changed files with 13 additions and 18 deletions

View File

@@ -1,6 +1,7 @@
import collections
from concurrent.futures import Future
from itertools import count
from subprocess import Popen
from typing import Any, Callable, Generator, Mapping, Match, TypeVar
from xmlrpc import client as xmlrpclib
@@ -123,27 +124,23 @@ def fchain(future, next_callback): ...
class ChromeBrowser:
remote_debugging_port: int
test_class: type[HttpCase]
chrome: Popen
devtools_port: int | None
ws_url: str
ws: WebSocket | None
request_id: int
user_data_dir: str
chrome_pid: int | None
screenshots_dir: str
screencasts_dir: str | None
screencasts_frames_dir: str | None
screencast_frames: list
window_size: str
touch_enabled: bool
sigxcpu_handler: Any
error_checker: Any
had_failure: bool
def __init__(self, test_class: type[HttpCase]) -> None: ...
def __init__(self, test_class: type[HttpCase], headless: bool = ...) -> None: ...
@property
def screencasts_frames_dir(self) -> str: ...
def signal_handler(self, sig, frame) -> None: ...
def stop(self) -> None: ...
@property
def executable(self) -> str | None: ...
dev_tools_frontend_url: str
def take_screenshot(
self, prefix: str = ..., suffix: str | None = ...
) -> Future: ...
@@ -151,7 +148,6 @@ class ChromeBrowser:
def set_cookie(self, name: str, value, path, domain) -> None: ...
def delete_cookie(self, name: str, **kwargs) -> None: ...
def navigate_to(self, url: str, wait_stop: bool = ...) -> None: ...
def clear(self) -> None: ...
LINE_PATTERN: str
def console_formatter(self, args: list) -> Callable[[Match[str]], str]: ...
@@ -178,10 +174,6 @@ class HttpCase(TransactionCase):
xmlrpc_object: xmlrpclib.ServerProxy
opener: Opener
def setUp(self) -> None: ...
@classmethod
def start_browser(cls) -> None: ...
@classmethod
def terminate_browser(cls) -> None: ...
def url_open(
self,
url: str,
@@ -194,7 +186,7 @@ class HttpCase(TransactionCase):
) -> requests.Response: ...
def logout(self, keep_db: bool = ...) -> None: ...
session: Session
def authenticate(self, user, password) -> Session: ...
def authenticate(self, user, password, browser: ChromeBrowser = ...) -> Session: ...
def browser_js(
self,
url_path: str,