@@ -106,19 +106,33 @@ def keyword_line(keyword_arguments, keyword_types, method_name):
106
106
from datetime import timedelta
107
107
from typing import Any, Optional, Union
108
108
109
+ from selenium.webdriver.remote.webdriver import WebDriver
110
+ from selenium.webdriver.remote.webelement import WebElement
109
111
110
112
class SeleniumLibrary:
111
113
"""
112
114
pyi_boilerplate_append = """
113
115
def add_library_components(self, library_components): ...
114
116
def get_keyword_names(self): ...
115
- def run_keyword(self, name, args, kwargs=None): ...
116
- def get_keyword_arguments(self, name): ...
117
- def get_keyword_tags(self, name): ...
118
- def get_keyword_documentation(self, name): ...
119
- def get_keyword_types(self, name): ...
120
- def get_keyword_source(self, keyword_name): ...
121
-
117
+ def run_keyword(self, name: str, args: tuple, kwargs: Optional[dict] = None): ...
118
+ def get_keyword_arguments(self, name: str): ...
119
+ def get_keyword_tags(self, name: str): ...
120
+ def get_keyword_documentation(self, name: str): ...
121
+ def get_keyword_types(self, name: str): ...
122
+ def get_keyword_source(self, keyword_name: str): ...
123
+ def failure_occurred(self): ...
124
+ def register_driver(self, driver: WebDriver, alias: str): ...
125
+ @property
126
+ def driver(self) -> WebDriver: ...
127
+ def find_element(self, locator: str, parent: Optional[WebElement] = None): ...
128
+ def find_elements(self, locator: str, parent: WebElement = None): ...
129
+ def _parse_plugins(self, plugins: Any): ...
130
+ def _parse_plugin_doc(self): ...
131
+ def _get_intro_documentation(self): ...
132
+ def _parse_listener(self, event_firing_webdriver: Any): ...
133
+ def _string_to_modules(self, modules: Any): ...
134
+ def _store_plugin_keywords(self, plugin): ...
135
+ def _resolve_screenshot_root_directory(self): ...
122
136
"""
123
137
124
138
INIT_METHOD = KeywordBuilder .build (SL .__init__ )
@@ -130,5 +144,5 @@ def get_keyword_source(self, keyword_name): ...
130
144
)
131
145
)
132
146
stub_file .writelines (FUNCTION_LIST )
133
- stub_file .write ("\n # methods from PythonLibCore " )
147
+ stub_file .write ("\n # methods from library. " )
134
148
stub_file .writelines (pyi_boilerplate_append .splitlines (keepends = True ))
0 commit comments