I have a selenium web scraping object called Bot().
In my GUI I want to call methods via an input box. I have tried:
bot = bot_module.Bot()
function_string = "somefunction(parameter)"
func_name = function_string.split("(")[0]
func_param = function_string.split("(")[-1].split(")")[0]
func = getattr(opus,func_name)
func(func_param)
This raises a valueError as defined in somefunction. Going a different way:
getattr(globals()['Bot'](),func_name)(func_param)
I get the error:
selenium.common.exceptions.SessionNotCreatedException: Message: Session is already started.
Any ideas?