from _typeshed import Incomplete
from common_utils.logger import create_logger as create_logger
from dataclasses import dataclass
from selenium import webdriver
from time import sleep
from typing import Literal

@dataclass
class DriverAction:
    action: Literal['url', 'get', 'sleep', 'click', 'send_keys', 'get_text', 'get_texts', 'get_class', 'get_classes', 'get_href', 'get_hrefs', 'scroll_down', 'save_url', 'save_all_tabs_urls', 'save_last_tab_url', 'close_tab']
    result_key: str | None = ...
    value: str | int | float | None = ...
    css_identifier: str | None = ...
    delim: str | None = ...
    delim_idx: int | None = ...

class SeleniumHandler:
    log: Incomplete
    headless: Incomplete
    undetected: Incomplete
    verbose: Incomplete
    raise_exceptions: Incomplete
    download_driver: Incomplete
    def __init__(self, headless: bool = False, undetected: bool = False, verbose: bool = True, raise_exceptions: bool = True, download_driver: bool = False) -> None: ...
    def log_msg(self, message: str, level: Literal['debug', 'info', 'warning', 'error'] = 'info'): ...
    def get_driver(self): ...
    def run_actions(self, actions: list[DriverAction], driver: webdriver.Chrome | None = None) -> dict[str, str | list[str] | None]: ...
    def run_action(self, action: DriverAction, driver: webdriver.Chrome) -> str | list[str] | None: ...
