@aaltat
This is far from ready, but this superstupid script just lists the keyword names and arguments and print it in form of a method definition:
from SeleniumLibrary import SeleniumLibrary
keywords = SeleniumLibrary().get_keyword_names()
for keyword in keywords:
args = SeleniumLibrary().get_keyword_arguments(keyword)
args_str = ""
for arg in args:
if isinstance(arg, tuple):
arg_str = f"{arg[0]}='{arg[1]}'"
else:
arg_str = str(arg)
args_str = f'{args_str}, {arg_str}'
print(f' def {keyword}(self{args_str}): ...')
This is the result. I was first a little bit confused about the Get WebElements
but i saw whyâŠ
def Get WebElement(self, locator): ...
def Get WebElements(self, locator): ...
def add_cookie(self, name, value, path='None', domain='None', secure='None', expiry='None'): ...
def add_location_strategy(self, strategy_name, strategy_keyword, persist='False'): ...
def alert_should_be_present(self, text='', action='ACCEPT', timeout='None'): ...
def alert_should_not_be_present(self, action='ACCEPT', timeout='0'): ...
def assign_id_to_element(self, locator, id): ...
def capture_element_screenshot(self, locator, filename='selenium-element-screenshot-{index}.png'): ...
def capture_page_screenshot(self, filename='selenium-screenshot-{index}.png'): ...
def checkbox_should_be_selected(self, locator): ...
def checkbox_should_not_be_selected(self, locator): ...
def choose_file(self, locator, file_path): ...
def clear_element_text(self, locator): ...
...
...
def mouse_out(self, locator): ...
def mouse_over(self, locator): ...
def mouse_up(self, locator): ...
def open_browser(self, url='None', browser='firefox', alias='None', remote_url='False', desired_capabilities='None', ff_profile_dir='None', options='None', service_log_path='None', executable_path='None'): ...
def open_context_menu(self, locator): ...
def page_should_contain(self, text, loglevel='TRACE'): ...
def page_should_contain_button(self, locator, message='None', loglevel='TRACE'): ...