id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12,900 | sdispater/poetry | src/poetry/utils/env/virtual_env.py | utils.env.virtual_env.VirtualEnv | from poetry.utils.env.script_strings import GET_PLATFORMS
from poetry.utils.env.script_strings import GET_ENVIRONMENT_INFO
from contextlib import contextmanager
from poetry.utils.env.script_strings import GET_SYS_PATH
from pathlib import Path
from copy import deepcopy
import re
import json
from typing import Any
from p... |
class VirtualEnv(Env):
'''
A virtual Python environment.
'''
def __init__(self, path: Path, base: Path | None=None) -> None:
pass
@property
def sys_path(self) -> list[str]:
pass
def get_supported_tags(self) -> list[Tag]:
pass
def get_marker_env(self) -> Marker... | 18 | 1 | 7 | 1 | 6 | 0 | 1 | 0.09 | 1 | 10 | 0 | 2 | 14 | 1 | 14 | 14 | 121 | 23 | 90 | 41 | 64 | 8 | 65 | 33 | 47 | 4 | 1 | 2 | 20 |
12,901 | sdispater/poetry | src/poetry/utils/helpers.py | utils.helpers.Downloader | from requests.utils import atomic_open
from contextlib import suppress
from pathlib import Path
from poetry.utils.constants import REQUESTS_TIMEOUT
from requests.exceptions import ConnectionError
from requests.exceptions import ChunkedEncodingError
from functools import cached_property
from poetry.utils.authenticator i... |
class Downloader:
def __init__(self, url: str, dest: Path, session: Authenticator | Session | None=None, max_retries: int=0):
pass
@cached_property
def accepts_ranges(self) -> bool:
pass
@cached_property
def total_size(self) -> int:
pass
def _get(self, start: int=0) ->... | 9 | 0 | 11 | 0 | 10 | 1 | 3 | 0.05 | 0 | 14 | 1 | 0 | 6 | 5 | 6 | 6 | 74 | 6 | 65 | 29 | 50 | 3 | 51 | 20 | 44 | 5 | 0 | 4 | 15 |
12,902 | sdispater/poetry | src/poetry/utils/helpers.py | utils.helpers.HTTPRangeRequestSupportedError | class HTTPRangeRequestSupportedError(Exception):
"""Raised when server unexpectedly supports byte ranges.""" | class HTTPRangeRequestSupportedError(Exception):
'''Raised when server unexpectedly supports byte ranges.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
12,903 | sdispater/poetry | src/poetry/utils/isolated_build.py | utils.isolated_build.IsolatedBuildBackendError | from build import BuildBackendException
import subprocess
from poetry.utils._compat import decode
class IsolatedBuildBackendError(IsolatedBuildBaseError):
def __init__(self, source: Path, exception: BuildBackendException) -> None:
super().__init__()
self.source = source
self.exception = ex... |
class IsolatedBuildBackendError(IsolatedBuildBaseError):
def __init__(self, source: Path, exception: BuildBackendException) -> None:
pass
def generate_message(self, source_string: str | None=None, build_command: str | None=None) -> str:
pass
def __str__(self) -> str:
pass | 4 | 0 | 13 | 1 | 11 | 0 | 1 | 0 | 1 | 4 | 0 | 0 | 3 | 2 | 3 | 13 | 41 | 6 | 35 | 12 | 29 | 0 | 18 | 10 | 14 | 2 | 4 | 1 | 4 |
12,904 | sdispater/poetry | src/poetry/utils/isolated_build.py | utils.isolated_build.IsolatedBuildBaseError | class IsolatedBuildBaseError(Exception):
... | class IsolatedBuildBaseError(Exception):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 0 | 10 | 1 | 0 | 1 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
12,905 | sdispater/poetry | src/poetry/utils/isolated_build.py | utils.isolated_build.IsolatedBuildInstallError | class IsolatedBuildInstallError(IsolatedBuildBaseError):
def __init__(self, requirements: Collection[str], output: str, error: str) -> None:
message = '\n\n'.join((f"Failed to install {', '.join(requirements)}.", f'Output:\n{output}', f'Error:\n{error}'))
super().__init__(message)
self._req... | class IsolatedBuildInstallError(IsolatedBuildBaseError):
def __init__(self, requirements: Collection[str], output: str, error: str) -> None:
pass
@property
def requirements(self) -> Collection[str]:
pass | 4 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 3 | 0 | 0 | 2 | 1 | 2 | 12 | 15 | 1 | 14 | 6 | 10 | 0 | 7 | 5 | 4 | 1 | 4 | 0 | 2 |
12,906 | sdispater/poetry | src/poetry/utils/isolated_build.py | utils.isolated_build.IsolatedEnv | import os
from poetry.utils.env import Env
from build.env import IsolatedEnv as BaseIsolatedEnv
class IsolatedEnv(BaseIsolatedEnv):
def __init__(self, env: Env, pool: RepositoryPool) -> None:
self._env = env
self._pool = pool
@property
def python_executable(self) -> str:
return st... |
class IsolatedEnv(BaseIsolatedEnv):
def __init__(self, env: Env, pool: RepositoryPool) -> None:
pass
@property
def python_executable(self) -> str:
pass
def make_extra_environ(self) -> dict[str, str]:
pass
def install(self, requirements: Collection[str]) -> None:
p... | 6 | 0 | 14 | 2 | 11 | 1 | 2 | 0.11 | 1 | 9 | 6 | 0 | 4 | 2 | 4 | 4 | 62 | 10 | 47 | 23 | 34 | 5 | 30 | 22 | 18 | 4 | 1 | 2 | 8 |
12,907 | sdispater/poetry | src/poetry/utils/password_manager.py | utils.password_manager.HTTPAuthCredential | import dataclasses
@dataclasses.dataclass
class HTTPAuthCredential:
username: str | None = dataclasses.field(default=None)
password: str | None = dataclasses.field(default=None) | @dataclasses.dataclass
class HTTPAuthCredential:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 0 | 0 | 0 |
12,908 | sdispater/poetry | src/poetry/utils/password_manager.py | utils.password_manager.PasswordManager | from contextlib import suppress
from poetry.config.config import Config
from poetry.utils.threading import atomic_cached_property
class PasswordManager:
def __init__(self, config: Config) -> None:
self._config = config
@atomic_cached_property
def use_keyring(self) -> bool:
return self._co... | null | 15 | 1 | 7 | 1 | 6 | 1 | 2 | 0.12 | 0 | 7 | 4 | 0 | 10 | 1 | 11 | 11 | 96 | 23 | 65 | 23 | 48 | 8 | 51 | 18 | 39 | 3 | 0 | 1 | 20 |
12,909 | sdispater/poetry | src/poetry/utils/password_manager.py | utils.password_manager.PoetryKeyring | from contextlib import suppress
from poetry.config.config import Config
import functools
class PoetryKeyring:
_EMPTY_USERNAME_KEY = '__poetry_source_empty_username__'
def __init__(self, namespace: str) -> None:
self._namespace = namespace
@staticmethod
def preflight_check(io: IO | None=None, ... | null | 14 | 1 | 15 | 2 | 12 | 1 | 3 | 0.16 | 0 | 9 | 3 | 0 | 6 | 1 | 8 | 8 | 156 | 31 | 108 | 39 | 81 | 17 | 91 | 32 | 69 | 6 | 0 | 3 | 28 |
12,910 | sdispater/poetry | src/poetry/utils/password_manager.py | utils.password_manager.PoetryKeyringError | class PoetryKeyringError(Exception):
pass | class PoetryKeyringError(Exception):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
12,911 | sdispater/poetry | src/poetry/utils/threading.py | utils.threading.AtomicCachedProperty | from typing import overload
from weakref import WeakKeyDictionary
import threading
import functools
class AtomicCachedProperty(functools.cached_property[T]):
def __init__(self, func: Callable[[C], T]) -> None:
super().__init__(func)
self._semaphore = threading.BoundedSemaphore()
self._lock... |
class AtomicCachedProperty(functools.cached_property[T]):
def __init__(self, func: Callable[[C], T]) -> None:
pass
@overload
def __get__(self, instance: None, owner: type[Any] | None=...) -> AtomicCachedProperty[T]:
pass
@overload
def __get__(self, instance: None, owner: type[Any] ... | 7 | 0 | 6 | 1 | 5 | 1 | 2 | 0.14 | 1 | 6 | 0 | 0 | 4 | 2 | 4 | 7 | 29 | 4 | 22 | 13 | 13 | 3 | 18 | 7 | 13 | 4 | 1 | 3 | 7 |
12,912 | sdispater/poetry | src/poetry/utils/wheel.py | utils.wheel.InvalidWheelNameError | class InvalidWheelNameError(Exception):
pass | class InvalidWheelNameError(Exception):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
12,913 | sdispater/poetry | src/poetry/utils/wheel.py | utils.wheel.Wheel | from poetry.utils.patterns import wheel_file_re
from packaging.tags import Tag
class Wheel:
def __init__(self, filename: str) -> None:
wheel_info = wheel_file_re.match(filename)
if not wheel_info:
raise InvalidWheelNameError(f'{filename} is not a valid wheel filename.')
self.fi... |
class Wheel:
def __init__(self, filename: str) -> None:
pass
def get_minimum_supported_index(self, tags: list[Tag]) -> int | None:
pass
def is_supported_by_environment(self, env: Env) -> bool:
pass | 4 | 0 | 7 | 1 | 6 | 0 | 2 | 0 | 0 | 8 | 2 | 0 | 3 | 8 | 3 | 3 | 25 | 5 | 20 | 14 | 16 | 0 | 18 | 14 | 14 | 2 | 0 | 1 | 5 |
12,914 | sdispater/poetry | src/poetry/vcs/git/backend.py | vcs.git.backend.Git | from dulwich.client import HTTPUnauthorized
from dulwich.client import get_transport_and_path
from dulwich.refs import ANNOTATED_TAG_SUFFIX
from poetry.utils.helpers import remove_directory
from subprocess import CalledProcessError
from dulwich import porcelain
from dulwich.repo import Repo
from poetry.console.exceptio... |
class Git:
@staticmethod
def as_repo(repo: Path) -> Repo:
pass
@staticmethod
def get_remote_url(repo: Repo, remote: str='origin') -> str:
pass
@staticmethod
def get_revision(repo: Repo) -> str:
pass
@classmethod
def info(cls, repo: Repo | Path) -> GitRepoLocalIn... | 28 | 4 | 24 | 3 | 19 | 3 | 3 | 0.14 | 0 | 14 | 5 | 0 | 0 | 0 | 13 | 13 | 342 | 51 | 257 | 73 | 218 | 35 | 146 | 49 | 129 | 9 | 0 | 4 | 39 |
12,915 | sdispater/poetry | src/poetry/vcs/git/backend.py | vcs.git.backend.GitRefSpec | import dataclasses
from dulwich.repo import Repo
@dataclasses.dataclass
class GitRefSpec:
branch: str | None = None
revision: str | None = None
tag: str | None = None
ref: bytes = dataclasses.field(default_factory=lambda: b'HEAD')
def resolve(self, remote_refs: FetchPackResult, repo: Repo) -> None... | @dataclasses.dataclass
class GitRefSpec:
def resolve(self, remote_refs: FetchPackResult, repo: Repo) -> None:
'''
Resolve the ref using the provided remote refs.
'''
pass
def _normalise(self, remote_refs: FetchPackResult, repo: Repo) -> None:
'''
Internal helper... | 13 | 3 | 12 | 1 | 9 | 2 | 3 | 0.24 | 0 | 2 | 0 | 0 | 7 | 0 | 7 | 7 | 98 | 11 | 70 | 22 | 58 | 17 | 46 | 18 | 38 | 9 | 0 | 3 | 20 |
12,916 | sdispater/poetry | src/poetry/vcs/git/backend.py | vcs.git.backend.GitRepoLocalInfo | import dataclasses
from pathlib import Path
from dulwich.repo import Repo
@dataclasses.dataclass
class GitRepoLocalInfo:
repo: dataclasses.InitVar[Repo | Path]
origin: str = dataclasses.field(init=False)
revision: str = dataclasses.field(init=False)
def __post_init__(self, repo: Repo | Path) -> None:
... | @dataclasses.dataclass
class GitRepoLocalInfo:
def __post_init__(self, repo: Repo | Path) -> None:
pass | 3 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 0 | 2 | 1 | 0 | 1 | 0 | 1 | 1 | 9 | 1 | 8 | 4 | 6 | 0 | 8 | 4 | 6 | 2 | 0 | 0 | 2 |
12,917 | sdispater/poetry | src/poetry/vcs/git/backend.py | vcs.git.backend.SubmoduleInfo | import dataclasses
@dataclasses.dataclass
class SubmoduleInfo:
path: str
url: str
name: str
revision: str | @dataclasses.dataclass
class SubmoduleInfo:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 1 | 4 | 0 | 5 | 1 | 4 | 0 | 0 | 0 | 0 |
12,918 | sdispater/poetry | src/poetry/vcs/git/system.py | vcs.git.system.SystemGit | import subprocess
import os
from dulwich.client import find_git_command
class SystemGit:
@classmethod
def clone(cls, repository: str, dest: Path) -> None:
cls._check_parameter(repository)
cls.run('clone', '--recurse-submodules', '--', repository, str(dest))
@classmethod
def checkout(c... |
class SystemGit:
@classmethod
def clone(cls, repository: str, dest: Path) -> None:
pass
@classmethod
def checkout(cls, rev: str, target: Path | None=None) -> None:
pass
@staticmethod
def run(*args: Any, **kwargs: Any) -> None:
pass
@staticmethod
def _check_param... | 9 | 1 | 9 | 1 | 8 | 1 | 2 | 0.09 | 0 | 5 | 0 | 0 | 0 | 0 | 4 | 4 | 44 | 6 | 35 | 12 | 26 | 3 | 18 | 8 | 13 | 2 | 0 | 1 | 6 |
12,919 | sdispater/poetry | src/poetry/version/version_selector.py | version.version_selector.VersionSelector | class VersionSelector:
def __init__(self, pool: RepositoryPool) -> None:
self._pool = pool
def find_best_candidate(self, package_name: str, target_package_version: str | None=None, allow_prereleases: bool | None=None, source: str | None=None) -> Package | None:
"""
Given a package name... | class VersionSelector:
def __init__(self, pool: RepositoryPool) -> None:
pass
def find_best_candidate(self, package_name: str, target_package_version: str | None=None, allow_prereleases: bool | None=None, source: str | None=None) -> Package | None:
'''
Given a package name and optional... | 3 | 1 | 22 | 3 | 17 | 3 | 3 | 0.15 | 0 | 3 | 1 | 0 | 2 | 1 | 2 | 2 | 45 | 6 | 34 | 16 | 24 | 5 | 17 | 10 | 13 | 5 | 0 | 2 | 6 |
12,920 | SeleniumHQ/selenium | py/generate.py | generate.CdpCommand | from textwrap import dedent, indent as tw_indent
from typing import Optional, cast, List, Union, Iterator
import itertools
from dataclasses import dataclass
@dataclass
class CdpCommand:
""" A CDP command. """
name: str
description: str
experimental: bool
deprecated: bool
parameters: List[CdpPar... | @dataclass
class CdpCommand:
''' A CDP command. '''
@property
def py_name(self):
''' Get a Python name for this command. '''
pass
@classmethod
def from_json(cls, command, domain) -> 'CdpCommand':
''' Instantiate a CDP command from a JSON object. '''
pass
def gene... | 8 | 5 | 28 | 1 | 25 | 2 | 6 | 0.07 | 0 | 5 | 2 | 0 | 3 | 0 | 4 | 4 | 127 | 9 | 110 | 25 | 102 | 8 | 89 | 23 | 83 | 18 | 0 | 3 | 24 |
12,921 | SeleniumHQ/selenium | py/generate.py | generate.CdpDomain | from dataclasses import dataclass
from typing import Optional, cast, List, Union, Iterator
import operator
from textwrap import dedent, indent as tw_indent
import itertools
@dataclass
class CdpDomain:
""" A CDP domain contains metadata, types, commands, and events. """
domain: str
description: Optional[str... | @dataclass
class CdpDomain:
''' A CDP domain contains metadata, types, commands, and events. '''
@property
def module(self):
''' The name of the Python module for this CDP domain. '''
pass
@classmethod
def from_json(cls, domain: dict):
''' Instantiate a CDP domain from a JSON... | 9 | 6 | 25 | 1 | 21 | 3 | 4 | 0.13 | 0 | 9 | 3 | 0 | 4 | 0 | 5 | 5 | 143 | 11 | 117 | 30 | 109 | 15 | 81 | 27 | 75 | 9 | 0 | 2 | 21 |
12,922 | SeleniumHQ/selenium | py/generate.py | generate.CdpEvent | import json
from typing import Optional, cast, List, Union, Iterator
from dataclasses import dataclass
from textwrap import dedent, indent as tw_indent
import inflection
@dataclass
class CdpEvent:
""" A CDP event object. """
name: str
description: Optional[str]
deprecated: bool
experimental: bool
... | @dataclass
class CdpEvent:
''' A CDP event object. '''
@property
def py_name(self):
''' Return the Python class name for this event. '''
pass
@classmethod
def from_json(cls, json: dict, domain: str):
''' Create a new CDP event instance from a JSON dict. '''
pass
... | 8 | 5 | 14 | 1 | 13 | 1 | 3 | 0.08 | 0 | 4 | 1 | 0 | 3 | 0 | 4 | 4 | 71 | 7 | 59 | 14 | 51 | 5 | 39 | 12 | 33 | 4 | 0 | 2 | 10 |
12,923 | SeleniumHQ/selenium | py/generate.py | generate.CdpItems | from dataclasses import dataclass
@dataclass
class CdpItems:
""" Represents the type of a repeated item. """
type: str
ref: str
@classmethod
def from_json(cls, type):
""" Generate code to instantiate an item from a JSON object. """
return cls(type.get('type'), type.get('$ref')) | @dataclass
class CdpItems:
''' Represents the type of a repeated item. '''
@classmethod
def from_json(cls, type):
''' Generate code to instantiate an item from a JSON object. '''
pass | 4 | 2 | 3 | 0 | 2 | 1 | 1 | 0.33 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 9 | 1 | 6 | 3 | 3 | 2 | 5 | 2 | 3 | 1 | 0 | 0 | 1 |
12,924 | SeleniumHQ/selenium | py/generate.py | generate.CdpParameter | from typing import Optional, cast, List, Union, Iterator
class CdpParameter(CdpProperty):
""" A parameter to a CDP command. """
def generate_code(self):
""" Generate the code for a parameter in a function call. """
if self.items:
if self.items.ref:
nested_type = ref... |
class CdpParameter(CdpProperty):
''' A parameter to a CDP command. '''
def generate_code(self):
''' Generate the code for a parameter in a function call. '''
pass
def generate_decl(self):
''' Generate the declaration for this parameter. '''
pass
def generate_doc(self)... | 5 | 5 | 13 | 1 | 10 | 2 | 3 | 0.17 | 1 | 3 | 1 | 0 | 4 | 0 | 4 | 10 | 56 | 7 | 42 | 12 | 37 | 7 | 37 | 12 | 32 | 6 | 1 | 2 | 13 |
12,925 | SeleniumHQ/selenium | py/generate.py | generate.CdpPrimitiveType | from enum import Enum
class CdpPrimitiveType(Enum):
""" All of the CDP types that map directly to a Python type. """
boolean = 'bool'
integer = 'int'
number = 'float'
object = 'dict'
string = 'str'
@classmethod
def get_annotation(cls, cdp_type):
""" Return a type annotation for... |
class CdpPrimitiveType(Enum):
''' All of the CDP types that map directly to a Python type. '''
@classmethod
def get_annotation(cls, cdp_type):
''' Return a type annotation for the CDP type. '''
pass
@classmethod
def get_constructor(cls, cdp_type, val):
''' Return the code to... | 5 | 3 | 6 | 0 | 5 | 1 | 2 | 0.18 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 51 | 22 | 2 | 17 | 11 | 12 | 3 | 15 | 9 | 12 | 2 | 4 | 1 | 4 |
12,926 | SeleniumHQ/selenium | py/generate.py | generate.CdpProperty | from dataclasses import dataclass
from typing import Optional, cast, List, Union, Iterator
from textwrap import dedent, indent as tw_indent
@dataclass
class CdpProperty:
""" A property belonging to a non-primitive CDP type. """
name: str
description: Optional[str]
type: Optional[str]
ref: Optional[... | @dataclass
class CdpProperty:
''' A property belonging to a non-primitive CDP type. '''
@property
def py_name(self):
''' Get this property's Python name. '''
pass
@property
def py_annotation(self):
''' This property's Python type annotation. '''
pass
@classmethod
... | 11 | 7 | 15 | 0 | 13 | 1 | 4 | 0.1 | 0 | 3 | 2 | 2 | 5 | 0 | 6 | 6 | 107 | 6 | 92 | 19 | 82 | 9 | 64 | 16 | 57 | 6 | 0 | 2 | 22 |
12,927 | SeleniumHQ/selenium | py/generate.py | generate.CdpReturn | class CdpReturn(CdpProperty):
""" A return value from a CDP command. """
@property
def py_annotation(self):
""" Return the Python type annotation for this return. """
if self.items:
if self.items.ref:
py_ref = ref_to_python(self.items.ref)
ann = f... | class CdpReturn(CdpProperty):
''' A return value from a CDP command. '''
@property
def py_annotation(self):
''' Return the Python type annotation for this return. '''
pass
def generate_doc(self):
''' Generate the docstring for this return. '''
pass
def generate_retu... | 5 | 4 | 10 | 0 | 9 | 1 | 3 | 0.14 | 1 | 2 | 1 | 0 | 3 | 0 | 3 | 9 | 35 | 2 | 29 | 9 | 24 | 4 | 24 | 8 | 20 | 5 | 1 | 2 | 9 |
12,928 | SeleniumHQ/selenium | py/generate.py | generate.CdpType | import operator
from typing import Optional, cast, List, Union, Iterator
from dataclasses import dataclass
from textwrap import dedent, indent as tw_indent
@dataclass
class CdpType:
""" A top-level CDP type. """
id: str
description: Optional[str]
type: str
items: Optional[CdpItems]
enum: List[s... | @dataclass
class CdpType:
''' A top-level CDP type. '''
@classmethod
def from_json(cls, type_):
''' Instantiate a CDP type from a JSON object. '''
pass
def generate_code(self):
''' Generate Python code for this type. '''
pass
def generate_primitive_code(self):
... | 9 | 7 | 26 | 2 | 19 | 5 | 4 | 0.25 | 0 | 6 | 3 | 0 | 5 | 0 | 6 | 6 | 168 | 18 | 120 | 33 | 112 | 30 | 86 | 32 | 79 | 7 | 0 | 3 | 22 |
12,929 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.DetachedShadowRootException | class DetachedShadowRootException(WebDriverException):
"""Raised when referenced shadow root is no longer attached to the DOM.""" | class DetachedShadowRootException(WebDriverException):
'''Raised when referenced shadow root is no longer attached to the DOM.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,930 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.ElementClickInterceptedException | from collections.abc import Sequence
from typing import Optional
class ElementClickInterceptedException(WebDriverException):
"""The Element Click command could not be completed because the element
receiving the events is obscuring the element that was requested to be
clicked."""
def __init__(self, msg... |
class ElementClickInterceptedException(WebDriverException):
'''The Element Click command could not be completed because the element
receiving the events is obscuring the element that was requested to be
clicked.'''
def __init__(self, msg: Optional[str]=None, screen: Optional[str]=None, stacktrace: Opt... | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 4 | 0 | 1 | 1 | 0 | 3 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,931 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.ElementNotInteractableException | from typing import Optional
from collections.abc import Sequence
class ElementNotInteractableException(InvalidElementStateException):
"""Thrown when an element is present in the DOM but interactions with that
element will hit another element due to paint order."""
def __init__(self, msg: Optional[str]=Non... |
class ElementNotInteractableException(InvalidElementStateException):
'''Thrown when an element is present in the DOM but interactions with that
element will hit another element due to paint order.'''
def __init__(self, msg: Optional[str]=None, screen: Optional[str]=None, stacktrace: Optional[Sequence[str]... | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 3 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 5 | 0 | 0 |
12,932 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.ElementNotSelectableException | class ElementNotSelectableException(InvalidElementStateException):
"""Thrown when trying to select an unselectable element.
For example, selecting a 'script' element.
""" | class ElementNotSelectableException(InvalidElementStateException):
'''Thrown when trying to select an unselectable element.
For example, selecting a 'script' element.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 5 | 1 | 1 | 1 | 0 | 3 | 1 | 1 | 0 | 0 | 5 | 0 | 0 |
12,933 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.ElementNotVisibleException | from typing import Optional
from collections.abc import Sequence
class ElementNotVisibleException(InvalidElementStateException):
"""Thrown when an element is present on the DOM, but it is not visible, and
so is not able to be interacted with.
Most commonly encountered when trying to click or read text of ... |
class ElementNotVisibleException(InvalidElementStateException):
'''Thrown when an element is present on the DOM, but it is not visible, and
so is not able to be interacted with.
Most commonly encountered when trying to click or read text of an
element that is hidden from view.
'''
def __init__... | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 7 | 1 | 1 | 1 | 0 | 5 | 1 | 1 | 0 | 0 | 5 | 0 | 0 |
12,934 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.ImeActivationFailedException | class ImeActivationFailedException(WebDriverException):
"""Thrown when activating an IME engine has failed.""" | class ImeActivationFailedException(WebDriverException):
'''Thrown when activating an IME engine has failed.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,935 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.ImeNotAvailableException | class ImeNotAvailableException(WebDriverException):
"""Thrown when IME support is not available.
This exception is thrown for every IME-related method call if IME
support is not available on the machine.
""" | class ImeNotAvailableException(WebDriverException):
'''Thrown when IME support is not available.
This exception is thrown for every IME-related method call if IME
support is not available on the machine.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 6 | 1 | 1 | 1 | 0 | 4 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,936 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.InsecureCertificateException | class InsecureCertificateException(WebDriverException):
"""Navigation caused the user agent to hit a certificate warning, which is
usually the result of an expired or invalid TLS certificate.""" | class InsecureCertificateException(WebDriverException):
'''Navigation caused the user agent to hit a certificate warning, which is
usually the result of an expired or invalid TLS certificate.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 3 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,937 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.InvalidArgumentException | class InvalidArgumentException(WebDriverException):
"""The arguments passed to a command are either invalid or malformed.""" | class InvalidArgumentException(WebDriverException):
'''The arguments passed to a command are either invalid or malformed.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,938 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.InvalidCookieDomainException | class InvalidCookieDomainException(WebDriverException):
"""Thrown when attempting to add a cookie under a different domain than the
current URL.""" | class InvalidCookieDomainException(WebDriverException):
'''Thrown when attempting to add a cookie under a different domain than the
current URL.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 3 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,939 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.InvalidCoordinatesException | class InvalidCoordinatesException(WebDriverException):
"""The coordinates provided to an interaction's operation are invalid.""" | class InvalidCoordinatesException(WebDriverException):
'''The coordinates provided to an interaction's operation are invalid.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,940 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.InvalidElementStateException | class InvalidElementStateException(WebDriverException):
"""Thrown when a command could not be completed because the element is in
an invalid state.
This can be caused by attempting to clear an element that isn't both
editable and resettable.
""" | class InvalidElementStateException(WebDriverException):
'''Thrown when a command could not be completed because the element is in
an invalid state.
This can be caused by attempting to clear an element that isn't both
editable and resettable.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 5 | 1 | 0 | 0 | 3 | 0 | 0 | 0 | 12 | 7 | 1 | 1 | 1 | 0 | 5 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,941 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.InvalidSelectorException | from typing import Optional
from collections.abc import Sequence
class InvalidSelectorException(WebDriverException):
"""Thrown when the selector which is used to find an element does not
return a WebElement.
Currently this only happens when the selector is an xpath expression
and it is either syntacti... |
class InvalidSelectorException(WebDriverException):
'''Thrown when the selector which is used to find an element does not
return a WebElement.
Currently this only happens when the selector is an xpath expression
and it is either syntactically invalid (i.e. it is not a xpath
expression) or the expre... | 2 | 1 | 6 | 1 | 5 | 1 | 1 | 1.33 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 13 | 16 | 3 | 6 | 5 | 2 | 8 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
12,942 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.InvalidSessionIdException | from typing import Optional
from collections.abc import Sequence
class InvalidSessionIdException(WebDriverException):
"""Occurs if the given session id is not in the list of active sessions,
meaning the session either does not exist or that it's not active."""
def __init__(self, msg: Optional[str]=None, s... |
class InvalidSessionIdException(WebDriverException):
'''Occurs if the given session id is not in the list of active sessions,
meaning the session either does not exist or that it's not active.'''
def __init__(self, msg: Optional[str]=None, screen: Optional[str]=None, stacktrace: Optional[Sequence[str]]=No... | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 3 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,943 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.JavascriptException | class JavascriptException(WebDriverException):
"""An error occurred while executing JavaScript supplied by the user.""" | class JavascriptException(WebDriverException):
'''An error occurred while executing JavaScript supplied by the user.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,944 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.MoveTargetOutOfBoundsException | class MoveTargetOutOfBoundsException(WebDriverException):
"""Thrown when the target provided to the `ActionsChains` move() method is
invalid, i.e. out of document.""" | class MoveTargetOutOfBoundsException(WebDriverException):
'''Thrown when the target provided to the `ActionsChains` move() method is
invalid, i.e. out of document.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 3 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,945 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.NoAlertPresentException | class NoAlertPresentException(WebDriverException):
"""Thrown when switching to no presented alert.
This can be caused by calling an operation on the Alert() class when
an alert is not yet on the screen.
""" | class NoAlertPresentException(WebDriverException):
'''Thrown when switching to no presented alert.
This can be caused by calling an operation on the Alert() class when
an alert is not yet on the screen.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 6 | 1 | 1 | 1 | 0 | 4 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,946 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.NoSuchAttributeException | class NoSuchAttributeException(WebDriverException):
"""Thrown when the attribute of element could not be found.
You may want to check if the attribute exists in the particular
browser you are testing against. Some browsers may have different
property names for the same property. (IE8's .innerText vs.... | class NoSuchAttributeException(WebDriverException):
'''Thrown when the attribute of element could not be found.
You may want to check if the attribute exists in the particular
browser you are testing against. Some browsers may have different
property names for the same property. (IE8's .innerText vs. ... | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 8 | 1 | 1 | 1 | 0 | 6 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,947 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.NoSuchCookieException | class NoSuchCookieException(WebDriverException):
"""No cookie matching the given path name was found amongst the associated
cookies of the current browsing context's active document.""" | class NoSuchCookieException(WebDriverException):
'''No cookie matching the given path name was found amongst the associated
cookies of the current browsing context's active document.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 3 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,948 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.NoSuchDriverException | from typing import Optional
from collections.abc import Sequence
class NoSuchDriverException(WebDriverException):
"""Raised when driver is not specified and cannot be located."""
def __init__(self, msg: Optional[str]=None, screen: Optional[str]=None, stacktrace: Optional[Sequence[str]]=None) -> None:
... |
class NoSuchDriverException(WebDriverException):
'''Raised when driver is not specified and cannot be located.'''
def __init__(self, msg: Optional[str]=None, screen: Optional[str]=None, stacktrace: Optional[Sequence[str]]=None) -> None:
pass | 2 | 1 | 6 | 1 | 5 | 0 | 1 | 0.17 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 13 | 9 | 2 | 6 | 5 | 2 | 1 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
12,949 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.NoSuchElementException | from collections.abc import Sequence
from typing import Optional
class NoSuchElementException(WebDriverException):
"""Thrown when element could not be found.
If you encounter this exception, you may want to check the following:
* Check your selector used in your find_by...
* Element may not ye... |
class NoSuchElementException(WebDriverException):
'''Thrown when element could not be found.
If you encounter this exception, you may want to check the following:
* Check your selector used in your find_by...
* Element may not yet be on the screen at the time of the find operation,
(w... | 2 | 1 | 6 | 1 | 5 | 1 | 1 | 1.33 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 13 | 16 | 3 | 6 | 5 | 2 | 8 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
12,950 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.NoSuchShadowRootException | class NoSuchShadowRootException(WebDriverException):
"""Thrown when trying to access the shadow root of an element when it does
not have a shadow root attached.""" | class NoSuchShadowRootException(WebDriverException):
'''Thrown when trying to access the shadow root of an element when it does
not have a shadow root attached.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 3 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,951 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.NoSuchWindowException | class NoSuchWindowException(InvalidSwitchToTargetException):
"""Thrown when window target to be switched doesn't exist.
To find the current set of active window handles, you can get a list
of the active window handles in the following way::
print driver.window_handles
""" | class NoSuchWindowException(InvalidSwitchToTargetException):
'''Thrown when window target to be switched doesn't exist.
To find the current set of active window handles, you can get a list
of the active window handles in the following way::
print driver.window_handles
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 8 | 2 | 1 | 1 | 0 | 5 | 1 | 1 | 0 | 0 | 5 | 0 | 0 |
12,952 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.ScreenshotException | class ScreenshotException(WebDriverException):
"""A screen capture was made impossible.""" | class ScreenshotException(WebDriverException):
'''A screen capture was made impossible.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,953 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.SessionNotCreatedException | from typing import Optional
from collections.abc import Sequence
class SessionNotCreatedException(WebDriverException):
"""A new session could not be created."""
def __init__(self, msg: Optional[str]=None, screen: Optional[str]=None, stacktrace: Optional[Sequence[str]]=None) -> None:
with_support = f'{... |
class SessionNotCreatedException(WebDriverException):
'''A new session could not be created.'''
def __init__(self, msg: Optional[str]=None, screen: Optional[str]=None, stacktrace: Optional[Sequence[str]]=None) -> None:
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,954 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.StaleElementReferenceException | from collections.abc import Sequence
from typing import Optional
class StaleElementReferenceException(WebDriverException):
"""Thrown when a reference to an element is now "stale".
Stale means the element no longer appears on the DOM of the page.
Possible causes of StaleElementReferenceException include,... |
class StaleElementReferenceException(WebDriverException):
'''Thrown when a reference to an element is now "stale".
Stale means the element no longer appears on the DOM of the page.
Possible causes of StaleElementReferenceException include, but not limited to:
* You are no longer on the same page, ... | 2 | 1 | 6 | 1 | 5 | 1 | 1 | 2 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 13 | 22 | 5 | 6 | 5 | 2 | 12 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
12,955 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.TimeoutException | class TimeoutException(WebDriverException):
"""Thrown when a command does not complete in enough time.""" | class TimeoutException(WebDriverException):
'''Thrown when a command does not complete in enough time.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,956 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.UnableToSetCookieException | class UnableToSetCookieException(WebDriverException):
"""Thrown when a driver fails to set a cookie.""" | class UnableToSetCookieException(WebDriverException):
'''Thrown when a driver fails to set a cookie.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,957 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.UnexpectedAlertPresentException | from collections.abc import Sequence
from typing import Optional
class UnexpectedAlertPresentException(WebDriverException):
"""Thrown when an unexpected alert has appeared.
Usually raised when an unexpected modal is blocking the webdriver
from executing commands.
"""
def __init__(self, msg: Opti... |
class UnexpectedAlertPresentException(WebDriverException):
'''Thrown when an unexpected alert has appeared.
Usually raised when an unexpected modal is blocking the webdriver
from executing commands.
'''
def __init__(self, msg: Optional[str]=None, screen: Optional[str]=None, stacktrace: Optional[S... | 3 | 1 | 6 | 0 | 6 | 0 | 1 | 0.33 | 1 | 2 | 0 | 0 | 2 | 1 | 2 | 14 | 19 | 3 | 12 | 10 | 3 | 4 | 6 | 4 | 3 | 1 | 4 | 0 | 2 |
12,958 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.UnexpectedTagNameException | class UnexpectedTagNameException(WebDriverException):
"""Thrown when a support class did not get an expected web element.""" | class UnexpectedTagNameException(WebDriverException):
'''Thrown when a support class did not get an expected web element.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,959 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.UnknownMethodException | class UnknownMethodException(WebDriverException):
"""The requested command matched a known URL but did not match any methods
for that URL.""" | class UnknownMethodException(WebDriverException):
'''The requested command matched a known URL but did not match any methods
for that URL.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 3 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
12,960 | SeleniumHQ/selenium | py/selenium/common/exceptions.py | selenium.common.exceptions.WebDriverException | from collections.abc import Sequence
from typing import Optional
class WebDriverException(Exception):
"""Base webdriver exception."""
def __init__(self, msg: Optional[str]=None, screen: Optional[str]=None, stacktrace: Optional[Sequence[str]]=None) -> None:
super().__init__()
self.msg = msg
... |
class WebDriverException(Exception):
'''Base webdriver exception.'''
def __init__(self, msg: Optional[str]=None, screen: Optional[str]=None, stacktrace: Optional[Sequence[str]]=None) -> None:
pass
def __str__(self) -> str:
pass | 3 | 1 | 8 | 0 | 8 | 0 | 2 | 0.06 | 1 | 2 | 0 | 28 | 2 | 3 | 2 | 12 | 19 | 2 | 16 | 10 | 11 | 1 | 14 | 8 | 11 | 3 | 3 | 1 | 4 |
12,961 | SeleniumHQ/selenium | py/selenium/webdriver/chrome/options.py | selenium.webdriver.chrome.options.Options | from selenium.webdriver.chromium.options import ChromiumOptions
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from typing import Optional
class Options(ChromiumOptions):
@property
def default_capabilities(self) -> dict:
return DesiredCapabilities.CHROME.copy()
def... |
class Options(ChromiumOptions):
@property
def default_capabilities(self) -> dict:
pass
def enable_mobile(self, android_package: Optional[str]='com.android.chrome', android_activity: Optional[str]=None, device_serial: Optional[str]=None) -> None:
pass | 4 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 1 | 4 | 1 | 0 | 2 | 0 | 2 | 47 | 12 | 1 | 11 | 9 | 2 | 0 | 5 | 3 | 2 | 1 | 6 | 0 | 2 |
12,962 | SeleniumHQ/selenium | py/selenium/webdriver/chrome/remote_connection.py | selenium.webdriver.chrome.remote_connection.ChromeRemoteConnection | from typing import Optional
from selenium.webdriver import DesiredCapabilities
from selenium.webdriver.chromium.remote_connection import ChromiumRemoteConnection
from selenium.webdriver.remote.client_config import ClientConfig
class ChromeRemoteConnection(ChromiumRemoteConnection):
browser_name = DesiredCapabiliti... |
class ChromeRemoteConnection(ChromiumRemoteConnection):
def __init__(self, remote_server_addr: str, keep_alive: bool=True, ignore_proxy: Optional[bool]=False, client_config: Optional[ClientConfig]=None) -> None:
pass | 2 | 0 | 15 | 0 | 15 | 0 | 1 | 0 | 1 | 4 | 1 | 0 | 1 | 0 | 1 | 19 | 18 | 1 | 17 | 9 | 9 | 0 | 4 | 3 | 2 | 1 | 2 | 0 | 1 |
12,963 | SeleniumHQ/selenium | py/selenium/webdriver/chrome/service.py | selenium.webdriver.chrome.service.Service | from selenium.types import SubprocessStdAlias
from selenium.webdriver.chromium import service
from typing import Optional
from collections.abc import Mapping, Sequence
class Service(service.ChromiumService):
"""A Service class that is responsible for the starting and stopping of
`chromedriver`.
:param exe... |
class Service(service.ChromiumService):
'''A Service class that is responsible for the starting and stopping of
`chromedriver`.
:param executable_path: install path of the chromedriver executable, defaults to `chromedriver`.
:param port: Port for the service to run on, defaults to 0 where the operating... | 6 | 1 | 17 | 0 | 17 | 0 | 1 | 0.44 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 37 | 28 | 2 | 18 | 10 | 8 | 8 | 3 | 2 | 1 | 1 | 6 | 0 | 1 |
12,964 | SeleniumHQ/selenium | py/selenium/webdriver/chrome/webdriver.py | selenium.webdriver.chrome.webdriver.WebDriver | from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chromium.webdriver import ChromiumDriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from typing import Optional
class WebDriver(ChromiumDriver):
""... |
class WebDriver(ChromiumDriver):
'''Controls the ChromeDriver and allows you to drive the browser.'''
def __init__(self, options: Optional[Options]=None, service: Optional[Service]=None, keep_alive: bool=True) -> None:
'''Creates a new instance of the chrome driver. Starts the service and
then... | 2 | 2 | 24 | 2 | 15 | 7 | 3 | 0.5 | 1 | 5 | 3 | 0 | 1 | 0 | 1 | 122 | 27 | 3 | 16 | 7 | 9 | 8 | 5 | 2 | 3 | 3 | 6 | 0 | 3 |
12,965 | SeleniumHQ/selenium | py/selenium/webdriver/chromium/options.py | selenium.webdriver.chromium.options.ChromiumOptions | from typing import BinaryIO, Optional, Union
from selenium.webdriver.common.options import ArgOptions
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
import base64
import os
class ChromiumOptions(ArgOptions):
KEY = 'goog:chromeOptions'
def __init__(self) -> None:
super()... |
class ChromiumOptions(ArgOptions):
def __init__(self) -> None:
pass
@property
def binary_location(self) -> str:
''':Returns: The location of the binary, otherwise an empty string.'''
pass
@binary_location.setter
def binary_location(self) -> str:
'''Allows you to set... | 25 | 12 | 8 | 1 | 5 | 3 | 2 | 0.48 | 1 | 9 | 1 | 2 | 12 | 5 | 12 | 45 | 124 | 22 | 69 | 33 | 48 | 33 | 59 | 25 | 45 | 4 | 5 | 2 | 22 |
12,966 | SeleniumHQ/selenium | py/selenium/webdriver/chromium/remote_connection.py | selenium.webdriver.chromium.remote_connection.ChromiumRemoteConnection | from selenium.webdriver.remote.remote_connection import RemoteConnection
from typing import Optional
from selenium.webdriver.remote.client_config import ClientConfig
class ChromiumRemoteConnection(RemoteConnection):
def __init__(self, remote_server_addr: str, vendor_prefix: str, browser_name: str, keep_alive: boo... |
class ChromiumRemoteConnection(RemoteConnection):
def __init__(self, remote_server_addr: str, vendor_prefix: str, browser_name: str, keep_alive: bool=True, ignore_proxy: Optional[bool]=False, client_config: Optional[ClientConfig]=None) -> None:
pass
def _remote_commands(self, vendor_prefix):
... | 3 | 0 | 18 | 0 | 18 | 0 | 2 | 0 | 1 | 4 | 1 | 2 | 2 | 1 | 2 | 18 | 38 | 1 | 37 | 15 | 26 | 0 | 11 | 7 | 8 | 2 | 1 | 1 | 3 |
12,967 | SeleniumHQ/selenium | py/selenium/webdriver/chromium/service.py | selenium.webdriver.chromium.service.ChromiumService | from io import IOBase
from selenium.webdriver.common import service
from selenium.types import SubprocessStdAlias
from collections.abc import Mapping, Sequence
from typing import Optional
class ChromiumService(service.Service):
"""A Service class that is responsible for the starting and stopping the
WebDriver ... |
class ChromiumService(service.Service):
'''A Service class that is responsible for the starting and stopping the
WebDriver instance of the ChromiumDriver.
:param executable_path: install path of the executable.
:param port: Port for the service to run on, defaults to 0 where the operating system will d... | 7 | 1 | 16 | 1 | 15 | 0 | 2 | 0.3 | 1 | 4 | 0 | 2 | 2 | 2 | 2 | 36 | 44 | 5 | 30 | 14 | 18 | 9 | 12 | 5 | 9 | 3 | 5 | 1 | 4 |
12,968 | SeleniumHQ/selenium | py/selenium/webdriver/chromium/webdriver.py | selenium.webdriver.chromium.webdriver.ChromiumDriver | from selenium.webdriver.common.driver_finder import DriverFinder
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
from typing import Optional
from selenium.webdriver.chromium.options import ChromiumOptions
from selenium.webdriver.remote.command import Command
from selenium.webdriver.chromium... |
class ChromiumDriver(RemoteWebDriver):
'''Controls the WebDriver instance of ChromiumDriver and allows you to
drive the browser.'''
def __init__(self, browser_name: str, vendor_prefix: str, options: Optional[ChromiumOptions]=None, service: Optional[ChromiumService]=None, keep_alive: bool=True) -> None:
... | 20 | 17 | 11 | 1 | 4 | 5 | 1 | 1.25 | 1 | 10 | 4 | 2 | 14 | 2 | 14 | 121 | 169 | 34 | 60 | 26 | 38 | 75 | 46 | 19 | 31 | 3 | 5 | 1 | 17 |
12,969 | SeleniumHQ/selenium | py/selenium/webdriver/common/action_chains.py | selenium.webdriver.common.action_chains.ActionChains | from selenium.webdriver.common.actions.wheel_input import ScrollOrigin, WheelInput
from selenium.webdriver.common.actions.action_builder import ActionBuilder
from selenium.webdriver.common.utils import keys_to_typing
from selenium.webdriver.common.actions.key_input import KeyInput
from selenium.webdriver.remote.webelem... |
class ActionChains:
'''ActionChains are a way to automate low level interactions such as mouse
movements, mouse button actions, key press, and context menu interactions.
This is useful for doing more complex actions like hover over and drag and
drop.
Generate user actions.
When you call meth... | 24 | 22 | 12 | 2 | 5 | 5 | 2 | 1.15 | 0 | 14 | 7 | 0 | 23 | 2 | 23 | 23 | 343 | 83 | 122 | 34 | 98 | 140 | 116 | 34 | 92 | 6 | 0 | 3 | 39 |
12,970 | SeleniumHQ/selenium | py/selenium/webdriver/common/actions/action_builder.py | selenium.webdriver.common.actions.action_builder.ActionBuilder | from selenium.webdriver.common.actions import interaction
from selenium.webdriver.common.actions.key_actions import KeyActions
from selenium.webdriver.common.actions.wheel_actions import WheelActions
from selenium.webdriver.common.actions.pointer_input import PointerInput
from selenium.webdriver.remote.command import C... |
class ActionBuilder:
def __init__(self, driver, mouse: Optional[PointerInput]=None, wheel: Optional[WheelInput]=None, keyboard: Optional[KeyInput]=None, duration: int=250) -> None:
pass
def get_device_with(self, name: str) -> Optional[Union['WheelInput', 'PointerInput', 'KeyInput']]:
'''Get t... | 19 | 7 | 11 | 1 | 4 | 6 | 1 | 1.31 | 0 | 10 | 7 | 0 | 13 | 5 | 13 | 13 | 161 | 27 | 58 | 37 | 32 | 76 | 46 | 25 | 32 | 3 | 0 | 2 | 15 |
12,971 | SeleniumHQ/selenium | py/selenium/webdriver/common/actions/input_device.py | selenium.webdriver.common.actions.input_device.InputDevice | from typing import Any, Optional
import uuid
class InputDevice:
"""Describes the input device being used for the action."""
def __init__(self, name: Optional[str]=None):
self.name = name or uuid.uuid4()
self.actions: list[Any] = []
def add_action(self, action: Any) -> None:
""""""... |
class InputDevice:
'''Describes the input device being used for the action.'''
def __init__(self, name: Optional[str]=None):
pass
def add_action(self, action: Any) -> None:
''''''
pass
def clear_actions(self) -> None:
pass
def create_pause(self, duration: float=0... | 5 | 2 | 3 | 0 | 2 | 0 | 1 | 0.2 | 0 | 3 | 0 | 3 | 4 | 2 | 4 | 4 | 16 | 4 | 10 | 7 | 5 | 2 | 10 | 7 | 5 | 1 | 0 | 0 | 4 |
12,972 | SeleniumHQ/selenium | py/selenium/webdriver/common/actions/interaction.py | selenium.webdriver.common.actions.interaction.Interaction | from selenium.webdriver.common.actions.input_device import InputDevice
class Interaction:
PAUSE = 'pause'
def __init__(self, source: InputDevice) -> None:
self.source = source |
class Interaction:
def __init__(self, source: InputDevice) -> None:
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 1 | 0 | 5 | 1 | 1 | 1 | 1 | 5 | 1 | 4 | 4 | 2 | 0 | 4 | 4 | 2 | 1 | 0 | 0 | 1 |
12,973 | SeleniumHQ/selenium | py/selenium/webdriver/common/actions/interaction.py | selenium.webdriver.common.actions.interaction.Pause | from typing import Union
class Pause(Interaction):
def __init__(self, source, duration: float=0) -> None:
super().__init__(source)
self.duration = duration
def encode(self) -> dict[str, Union[str, int]]:
return {'type': self.PAUSE, 'duration': int(self.duration * 1000)} |
class Pause(Interaction):
def __init__(self, source, duration: float=0) -> None:
pass
def encode(self) -> dict[str, Union[str, int]]:
pass | 3 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 4 | 0 | 0 | 2 | 1 | 2 | 3 | 7 | 1 | 6 | 4 | 3 | 0 | 6 | 4 | 3 | 1 | 1 | 0 | 2 |
12,974 | SeleniumHQ/selenium | py/selenium/webdriver/common/actions/key_actions.py | selenium.webdriver.common.actions.key_actions.KeyActions | from selenium.webdriver.common.actions.wheel_input import WheelInput
from selenium.webdriver.common.actions.key_input import KeyInput
from selenium.webdriver.common.actions.pointer_input import PointerInput
from selenium.webdriver.common.utils import keys_to_typing
from selenium.webdriver.common.actions.interaction imp... |
class KeyActions(Interaction):
def __init__(self, source: KeyInput | PointerInput | WheelInput | None=None) -> None:
pass
def key_down(self, letter: str) -> KeyActions:
pass
def key_up(self, letter: str) -> KeyActions:
pass
def pause(self, duration: int=0) -> KeyActions:
... | 7 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 1 | 7 | 3 | 0 | 6 | 1 | 6 | 7 | 28 | 5 | 23 | 10 | 16 | 0 | 23 | 10 | 16 | 3 | 1 | 1 | 9 |
12,975 | SeleniumHQ/selenium | py/selenium/webdriver/common/actions/key_input.py | selenium.webdriver.common.actions.key_input.KeyInput | from selenium.webdriver.common.actions.interaction import Interaction, Pause
from selenium.webdriver.common.actions import interaction
from selenium.webdriver.common.actions.input_device import InputDevice
class KeyInput(InputDevice):
def __init__(self, name: str) -> None:
super().__init__()
self.... |
class KeyInput(InputDevice):
def __init__(self, name: str) -> None:
pass
def encode(self) -> dict:
pass
def create_key_down(self, key) -> None:
pass
def create_key_up(self, key) -> None:
pass
def create_pause(self, pause_duration: float=0) -> None:
pass | 6 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 6 | 2 | 0 | 5 | 2 | 5 | 9 | 17 | 4 | 13 | 8 | 7 | 0 | 13 | 8 | 7 | 1 | 1 | 0 | 5 |
12,976 | SeleniumHQ/selenium | py/selenium/webdriver/common/actions/key_input.py | selenium.webdriver.common.actions.key_input.TypingInteraction | from selenium.webdriver.common.actions.interaction import Interaction, Pause
class TypingInteraction(Interaction):
def __init__(self, source, type_, key) -> None:
super().__init__(source)
self.type = type_
self.key = key
def encode(self) -> dict:
return {'type': self.type, 'va... |
class TypingInteraction(Interaction):
def __init__(self, source, type_, key) -> None:
pass
def encode(self) -> dict:
pass | 3 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 2 | 2 | 2 | 3 | 8 | 1 | 7 | 5 | 4 | 0 | 7 | 5 | 4 | 1 | 1 | 0 | 2 |
12,977 | SeleniumHQ/selenium | py/selenium/webdriver/common/actions/mouse_button.py | selenium.webdriver.common.actions.mouse_button.MouseButton | class MouseButton:
LEFT = 0
MIDDLE = 1
RIGHT = 2
BACK = 3
FORWARD = 4 | class MouseButton:
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 6 | 6 | 5 | 0 | 6 | 6 | 5 | 0 | 0 | 0 | 0 |
12,978 | SeleniumHQ/selenium | py/selenium/webdriver/common/actions/pointer_actions.py | selenium.webdriver.common.actions.pointer_actions.PointerActions | from selenium.webdriver.common.actions.mouse_button import MouseButton
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.common.actions.interaction import Interaction
from selenium.webdriver.common.actions import interaction
from typing import Optional
from selenium.webdriver.common.ac... |
class PointerActions(Interaction):
def __init__(self, source: Optional[PointerInput]=None, duration: int=250):
'''
Args:
- source: PointerInput instance
- duration: override the default 250 msecs of DEFAULT_MOVE_DURATION in source
'''
pass
def pointer_down(self... | 14 | 1 | 13 | 0 | 12 | 0 | 1 | 0.03 | 1 | 7 | 3 | 0 | 13 | 2 | 13 | 14 | 179 | 13 | 161 | 69 | 95 | 5 | 55 | 17 | 41 | 2 | 1 | 1 | 18 |
12,979 | SeleniumHQ/selenium | py/selenium/webdriver/common/actions/pointer_input.py | selenium.webdriver.common.actions.pointer_input.PointerInput | from selenium.webdriver.common.actions.input_device import InputDevice
from typing import Any, Optional, Union
from selenium.common.exceptions import InvalidArgumentException
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.common.actions.interaction import POINTER, POINTER_KINDS
cla... |
class PointerInput(InputDevice):
def __init__(self, kind, name):
pass
def create_pointer_move(self, duration=DEFAULT_MOVE_DURATION, x: float=0, y: float=0, origin: Optional[WebElement]=None, **kwargs):
pass
def create_pointer_down(self, **kwargs):
pass
def create_pointer_up(... | 9 | 0 | 6 | 0 | 6 | 0 | 2 | 0 | 1 | 7 | 2 | 0 | 8 | 3 | 8 | 12 | 54 | 8 | 46 | 26 | 30 | 0 | 38 | 19 | 29 | 4 | 1 | 2 | 14 |
12,980 | SeleniumHQ/selenium | py/selenium/webdriver/common/actions/wheel_actions.py | selenium.webdriver.common.actions.wheel_actions.WheelActions | from selenium.webdriver.common.actions.wheel_input import WheelInput
from selenium.webdriver.common.actions.interaction import WHEEL, Interaction
from typing import Optional
class WheelActions(Interaction):
def __init__(self, source: Optional[WheelInput]=None):
if source is None:
source = Whee... |
class WheelActions(Interaction):
def __init__(self, source: Optional[WheelInput]=None):
pass
def pause(self, duration: float=0):
pass
def scroll(self, x=0, y=0, delta_x=0, delta_y=0, duration=0, origin='viewport'):
pass | 4 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 3 | 1 | 0 | 3 | 0 | 3 | 4 | 13 | 2 | 11 | 4 | 7 | 0 | 11 | 4 | 7 | 2 | 1 | 1 | 4 |
12,981 | SeleniumHQ/selenium | py/selenium/webdriver/common/actions/wheel_input.py | selenium.webdriver.common.actions.wheel_input.ScrollOrigin | from typing import Union
from selenium.webdriver.remote.webelement import WebElement
class ScrollOrigin:
def __init__(self, origin: Union[str, WebElement], x_offset: int, y_offset: int) -> None:
self._origin = origin
self._x_offset = x_offset
self._y_offset = y_offset
@classmethod
... |
class ScrollOrigin:
def __init__(self, origin: Union[str, WebElement], x_offset: int, y_offset: int) -> None:
pass
@classmethod
def from_element(cls, element: WebElement, x_offset: int=0, y_offset: int=0):
pass
@classmethod
def from_viewport(cls, x_offset: int=0, y_offset: int=0):
... | 12 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 3 | 1 | 0 | 4 | 3 | 6 | 6 | 25 | 5 | 20 | 15 | 8 | 0 | 15 | 10 | 8 | 1 | 0 | 0 | 6 |
12,982 | SeleniumHQ/selenium | py/selenium/webdriver/common/actions/wheel_input.py | selenium.webdriver.common.actions.wheel_input.WheelInput | from selenium.webdriver.common.actions import interaction
from typing import Union
from selenium.webdriver.common.actions.input_device import InputDevice
from selenium.webdriver.remote.webelement import WebElement
class WheelInput(InputDevice):
def __init__(self, name) -> None:
super().__init__(name=name)... |
class WheelInput(InputDevice):
def __init__(self, name) -> None:
pass
def encode(self) -> dict:
pass
def create_scroll(self, x: int, y: int, delta_x: int, delta_y: int, duration: int, origin) -> None:
pass
def create_pause(self, pause_duration: Union[int, float]=0) -> None:
... | 5 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 5 | 1 | 0 | 4 | 2 | 4 | 8 | 26 | 3 | 23 | 7 | 18 | 0 | 13 | 7 | 8 | 2 | 1 | 1 | 5 |
12,983 | SeleniumHQ/selenium | py/selenium/webdriver/common/alert.py | selenium.webdriver.common.alert.Alert | from selenium.webdriver.remote.command import Command
from selenium.webdriver.common.utils import keys_to_typing
class Alert:
"""Allows to work with alerts.
Use this class to interact with alert prompts. It contains methods for dismissing,
accepting, inputting, and getting text from alert prompts.
A... |
class Alert:
'''Allows to work with alerts.
Use this class to interact with alert prompts. It contains methods for dismissing,
accepting, inputting, and getting text from alert prompts.
Accepting / Dismissing alert prompts::
Alert(driver).accept()
Alert(driver).dismiss()
Inputting ... | 7 | 6 | 6 | 1 | 2 | 3 | 1 | 2.42 | 0 | 2 | 1 | 0 | 5 | 1 | 5 | 5 | 58 | 17 | 12 | 8 | 5 | 29 | 11 | 7 | 5 | 1 | 0 | 0 | 5 |
12,984 | SeleniumHQ/selenium | py/selenium/webdriver/common/bidi/cdp.py | selenium.webdriver.common.bidi.cdp.BrowserError | class BrowserError(Exception):
"""This exception is raised when the browser's response to a command
indicates that an error occurred."""
def __init__(self, obj):
self.code = obj.get('code')
self.message = obj.get('message')
self.detail = obj.get('data')
def __str__(self):
... | class BrowserError(Exception):
'''This exception is raised when the browser's response to a command
indicates that an error occurred.'''
def __init__(self, obj):
pass
def __str__(self):
pass | 3 | 1 | 3 | 0 | 3 | 0 | 1 | 0.29 | 1 | 0 | 0 | 0 | 2 | 3 | 2 | 12 | 11 | 2 | 7 | 6 | 4 | 2 | 7 | 6 | 4 | 1 | 3 | 0 | 2 |
12,985 | SeleniumHQ/selenium | py/selenium/webdriver/common/bidi/cdp.py | selenium.webdriver.common.bidi.cdp.CdpBase | from typing import Any
import json
from collections.abc import AsyncGenerator
from contextlib import asynccontextmanager
import logging
from trio_websocket import ConnectionClosed as WsConnectionClosed
import itertools
from collections import defaultdict
from collections.abc import Generator
import trio
class CdpBase:... |
class CdpBase:
def __init__(self, ws, session_id, target_id):
pass
async def execute(self, cmd: Generator[dict, T, Any]) -> T:
'''Execute a command on the server and wait for the result.
:param cmd: any CDP command
:returns: a CDP result
'''
pass
def liste... | 9 | 6 | 16 | 1 | 12 | 4 | 3 | 0.29 | 0 | 12 | 4 | 2 | 7 | 7 | 7 | 7 | 121 | 11 | 85 | 35 | 75 | 25 | 82 | 32 | 73 | 7 | 0 | 2 | 22 |
12,986 | SeleniumHQ/selenium | py/selenium/webdriver/common/bidi/cdp.py | selenium.webdriver.common.bidi.cdp.CdpConnection | from contextlib import asynccontextmanager
import json
import trio
from collections.abc import AsyncIterator
from trio_websocket import ConnectionClosed as WsConnectionClosed
class CdpConnection(CdpBase, trio.abc.AsyncResource):
"""Contains the connection state for a Chrome DevTools Protocol server.
CDP can m... |
class CdpConnection(CdpBase, trio.abc.AsyncResource):
'''Contains the connection state for a Chrome DevTools Protocol server.
CDP can multiplex multiple "sessions" over a single connection. This
class corresponds to the "root" session, i.e. the implicitly created
session that has no session ID. This cl... | 7 | 6 | 15 | 1 | 9 | 5 | 3 | 0.69 | 2 | 5 | 2 | 0 | 5 | 1 | 5 | 12 | 91 | 10 | 48 | 20 | 39 | 33 | 40 | 19 | 32 | 9 | 1 | 3 | 13 |
12,987 | SeleniumHQ/selenium | py/selenium/webdriver/common/bidi/cdp.py | selenium.webdriver.common.bidi.cdp.CdpConnectionClosed | from trio_websocket import ConnectionClosed as WsConnectionClosed
class CdpConnectionClosed(WsConnectionClosed):
"""Raised when a public method is called on a closed CDP connection."""
def __init__(self, reason):
"""Constructor.
:param reason:
:type reason: wsproto.frame_protocol.Clos... |
class CdpConnectionClosed(WsConnectionClosed):
'''Raised when a public method is called on a closed CDP connection.'''
def __init__(self, reason):
'''Constructor.
:param reason:
:type reason: wsproto.frame_protocol.CloseReason
'''
pass
def __repr__(self):
'... | 3 | 3 | 5 | 1 | 2 | 3 | 1 | 1.2 | 1 | 0 | 0 | 0 | 2 | 1 | 2 | 2 | 14 | 3 | 5 | 4 | 2 | 6 | 5 | 4 | 2 | 1 | 1 | 0 | 2 |
12,988 | SeleniumHQ/selenium | py/selenium/webdriver/common/bidi/cdp.py | selenium.webdriver.common.bidi.cdp.CdpSession | import trio
from contextlib import asynccontextmanager
class CdpSession(CdpBase):
"""Contains the state for a CDP session.
Generally you should not instantiate this object yourself; you should call
:meth:`CdpConnection.open_session`.
"""
def __init__(self, ws, session_id, target_id):
"""C... |
class CdpSession(CdpBase):
'''Contains the state for a CDP session.
Generally you should not instantiate this object yourself; you should call
:meth:`CdpConnection.open_session`.
'''
def __init__(self, ws, session_id, target_id):
'''Constructor.
:param trio_websocket.WebSocketConne... | 6 | 4 | 17 | 3 | 9 | 5 | 2 | 0.61 | 1 | 1 | 0 | 0 | 3 | 4 | 3 | 10 | 62 | 12 | 31 | 12 | 23 | 19 | 29 | 10 | 23 | 3 | 1 | 2 | 7 |
12,989 | SeleniumHQ/selenium | py/selenium/webdriver/common/bidi/cdp.py | selenium.webdriver.common.bidi.cdp.CmEventProxy | from dataclasses import dataclass
from typing import Any
@dataclass
class CmEventProxy:
"""A proxy object returned by :meth:`CdpBase.wait_for()``.
After the context manager executes, this proxy object will have a
value set that contains the returned event.
"""
value: Any = None | @dataclass
class CmEventProxy:
'''A proxy object returned by :meth:`CdpBase.wait_for()``.
After the context manager executes, this proxy object will have a
value set that contains the returned event.
'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 2 | 2 | 2 | 1 | 4 | 2 | 2 | 1 | 0 | 0 | 0 | 0 |
12,990 | SeleniumHQ/selenium | py/selenium/webdriver/common/bidi/cdp.py | selenium.webdriver.common.bidi.cdp.InternalError | class InternalError(Exception):
"""This exception is only raised when there is faulty logic in TrioCDP or
the integration with PyCDP.""" | class InternalError(Exception):
'''This exception is only raised when there is faulty logic in TrioCDP or
the integration with PyCDP.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 3 | 0 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
12,991 | SeleniumHQ/selenium | py/selenium/webdriver/common/bidi/console.py | selenium.webdriver.common.bidi.console.Console | from enum import Enum
class Console(Enum):
ALL = 'all'
LOG = 'log'
ERROR = 'error' |
class Console(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
12,992 | SeleniumHQ/selenium | py/selenium/webdriver/common/bidi/script.py | selenium.webdriver.common.bidi.script.Script | import math
import datetime
from typing import Any, Optional
from selenium.common.exceptions import WebDriverException
from selenium.webdriver.common.bidi.common import command_builder
from selenium.webdriver.common.bidi.session import Session
from selenium.webdriver.common.bidi.log import LogEntryAdded
class Script:
... |
class Script:
'''BiDi implementation of the script module.'''
def __init__(self, conn, driver=None):
pass
def add_console_message_handler(self, handler):
pass
def add_javascript_error_handler(self, handler):
pass
def remove_console_message_handler(self, id):
pass... | 19 | 11 | 4 | 0 | 4 | 0 | 1 | 0 | 0 | 2 | 1 | 0 | 7 | 2 | 7 | 7 | 35 | 8 | 27 | 12 | 18 | 0 | 27 | 12 | 18 | 2 | 0 | 1 | 11 |
12,993 | SeleniumHQ/selenium | py/selenium/webdriver/common/by.py | selenium.webdriver.common.by.By | from typing import Literal, Optional
class By:
"""Set of supported locator strategies.
ID:
--
Select the element by its ID.
>>> element = driver.find_element(By.ID, "myElement")
XPATH:
------
Select the element via XPATH.
- absolute path
- relative path
>>> eleme... |
class By:
'''Set of supported locator strategies.
ID:
--
Select the element by its ID.
>>> element = driver.find_element(By.ID, "myElement")
XPATH:
------
Select the element via XPATH.
- absolute path
- relative path
>>> element = driver.find_element(By.XPATH, "//htm... | 7 | 1 | 2 | 0 | 2 | 0 | 1 | 1.89 | 0 | 1 | 0 | 0 | 0 | 0 | 3 | 3 | 76 | 21 | 19 | 16 | 12 | 36 | 16 | 13 | 12 | 1 | 0 | 0 | 3 |
12,994 | SeleniumHQ/selenium | py/selenium/webdriver/common/desired_capabilities.py | selenium.webdriver.common.desired_capabilities.DesiredCapabilities | class DesiredCapabilities:
"""Set of default supported desired capabilities.
Use this as a starting point for creating a desired capabilities object for
requesting remote webdrivers for connecting to selenium server or selenium grid.
Usage Example::
from selenium import webdriver
from... | class DesiredCapabilities:
'''Set of default supported desired capabilities.
Use this as a starting point for creating a desired capabilities object for
requesting remote webdrivers for connecting to selenium server or selenium grid.
Usage Example::
from selenium import webdriver
from se... | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.34 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 18 | 47 | 12 | 46 | 16 | 12 | 12 | 11 | 0 | 0 | 0 | 0 |
12,995 | SeleniumHQ/selenium | py/selenium/webdriver/common/driver_finder.py | selenium.webdriver.common.driver_finder.DriverFinder | from selenium.webdriver.common.options import BaseOptions
from selenium.webdriver.common.selenium_manager import SeleniumManager
from pathlib import Path
from selenium.common.exceptions import NoSuchDriverException
from selenium.webdriver.common.service import Service
class DriverFinder:
"""A Driver finding class ... |
class DriverFinder:
'''A Driver finding class responsible for obtaining the correct driver and
associated browser.
:param service: instance of the driver service class.
:param options: instance of the browser options class.
'''
def __init__(self, service: Service, options: BaseOptions) -> ... | 6 | 1 | 11 | 1 | 10 | 0 | 3 | 0.16 | 0 | 10 | 4 | 0 | 5 | 3 | 5 | 5 | 72 | 13 | 51 | 18 | 45 | 8 | 46 | 17 | 40 | 7 | 0 | 3 | 15 |
12,996 | SeleniumHQ/selenium | py/selenium/webdriver/common/fedcm/account.py | selenium.webdriver.common.fedcm.account.Account | class Account:
"""Represents an account displayed in a FedCM account list.
See: https://w3c-fedid.github.io/FedCM/#dictdef-identityprovideraccount
https://w3c-fedid.github.io/FedCM/#webdriver-accountlist
"""
account_id = _AccountDescriptor('accountId')
email = _AccountDescriptor('email')
... | class Account:
'''Represents an account displayed in a FedCM account list.
See: https://w3c-fedid.github.io/FedCM/#dictdef-identityprovideraccount
https://w3c-fedid.github.io/FedCM/#webdriver-accountlist
'''
def __init__(self, account_data):
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.33 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 19 | 3 | 12 | 12 | 10 | 4 | 12 | 12 | 10 | 1 | 0 | 0 | 1 |
12,997 | SeleniumHQ/selenium | py/selenium/webdriver/common/fedcm/account.py | selenium.webdriver.common.fedcm.account.LoginState | from enum import Enum
class LoginState(Enum):
SIGN_IN = 'SignIn'
SIGN_UP = 'SignUp' |
class LoginState(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 4 | 0 | 0 |
12,998 | SeleniumHQ/selenium | py/selenium/webdriver/common/fedcm/account.py | selenium.webdriver.common.fedcm.account._AccountDescriptor | from typing import Optional
class _AccountDescriptor:
def __init__(self, name):
self.name = name
def __get__(self, obj, cls) -> Optional[str]:
return obj._account_data.get(self.name)
def __set__(self, obj, value) -> None:
raise AttributeError('Cannot set readonly attribute') |
class _AccountDescriptor:
def __init__(self, name):
pass
def __get__(self, obj, cls) -> Optional[str]:
pass
def __set__(self, obj, value) -> None:
pass | 4 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 3 | 1 | 3 | 3 | 9 | 2 | 7 | 5 | 3 | 0 | 7 | 5 | 3 | 1 | 0 | 0 | 3 |
12,999 | SeleniumHQ/selenium | py/selenium/webdriver/common/fedcm/dialog.py | selenium.webdriver.common.fedcm.dialog.Dialog | from typing import Optional
from selenium.webdriver.common.fedcm.account import Account
class Dialog:
"""Represents a FedCM dialog that can be interacted with."""
DIALOG_TYPE_ACCOUNT_LIST = 'AccountChooser'
DIALOG_TYPE_AUTO_REAUTH = 'AutoReauthn'
def __init__(self, driver) -> None:
self._drive... |
class Dialog:
'''Represents a FedCM dialog that can be interacted with.'''
def __init__(self, driver) -> None:
pass
@property
def type(self) -> Optional[str]:
'''Gets the type of the dialog currently being shown.'''
pass
@property
def title(self) -> str:
'''Gets... | 12 | 8 | 3 | 0 | 2 | 1 | 1 | 0.33 | 0 | 3 | 1 | 0 | 8 | 1 | 8 | 8 | 41 | 9 | 24 | 17 | 12 | 8 | 21 | 14 | 12 | 2 | 0 | 0 | 9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.