Hello. I’m currently working on a robot framework based project. My approach is to only write test cases in robot files and all implementations will be on python as custom libraries. This is working fine, it’s just that I want the report to be more specific on the actions done to perform the test but only the custom keywords used in the test cases are visible. I was expecting keywords to be nested in the report since keywords are also nested in the test implementations.
Example:
Sample. robot
*** Settings ***
Library CustomLibrary
*** Test Cases ***
Sample Test Case
Login username=test password=test
CustomLibrary Sample Implementation
@library
class CustomLibrary:
def __init__(self):
self.se_lib = SeleniumLibrary()
@keyword
def login(username, password):
self.se_lib.input_text(u_locator, username)
self.se_lib.input_text(p_locator, password)
self.se_lib.click(login_locator)
When I run this sample script. My expectation is that keywords are nested under “login” since the methods used inside the keyword are keyword provided by selenium library.
I already tried several ways but could not achieve what I wanted, one is implementing the custom library as a DynamicCore and added SeleniumLibrary as a library component but did not work.
Any idea on how to approach this?
Thanks