Custom or BuiltIn Keywords used inside a custom keyword not appearing in the report

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

With your example you are really asking If Robot could inject itself into Python interpreter to inspect to examine every function / method call to see if that call is also exposed as a keyword to robot side. This is very bad idea from performance point of view. Not completely impossible but still very bad…

Why are you not running the same keywords from your custom custom keyword running from RF keyword instead of Python ? I can make a guess why but cuz you didn’t mention a reason, I had to ask…