Problem: How do you maintain the session and pass it back to be used in a following Keyword?
Error: Could not find active page
my robot file has a test:
authentication a user this is via a custom library which works by calling browser() in the function via from Browser import Browser
Click “Go To This Link” this would be using Library Browser in the robot file
It appears as though the browser object when defined in the custom library doesn’t pass back to the calling robot file so that it can be used by Library Browser in the Click Click “Keyword Documentation” step.
I’ll have to leave that for a Browser Library maintainer to answer, but it looks to me like you have 2 instances of browser library, one in robot framework, and a separate one in the python file, so I’m not surprised by the error you got, but I also don’t know how to make your test case work the way you want.
Seems as though this is the answer. Start the initial browser process off in the robot file. grab the started library Browser reference using BuiltIn().get_library_instance(‘Browser’) in the custom python library (do what you need to do there…), then you’ll be able to continue on the robot file with additional browser steps. Only Caveat seems like code complete doesn’t work on the builtIn object (at least in Pycharm for me)