Sorry about the mistake with posting in “Browser” section. Fixed
As for the Execute JavaScript, thanks for the tip. But I think it works differently from the Evaluate keyword I’m asking about? And even after replacing Evaluate with Execute JavaScript, I’m now getting different error. Keyword failed: JavascriptException: Message: javascript error: Unexpected token '<’
Evaluate keyword runs python code - there is no way to use that for evaluating javascript.
Second, you get error because you are essentially passing string <selenium.webdriver..blablabla> (python repr output) into javascript - it obviously fails as it is not js syntax. My js is a bit rusty but essentially your javascript looks like it has other issues too and without firing up proper selenium session, i’d suggest to try this;
That is the way to pass any values from robot/python side to be used in the js side that runs in the browser. Each argument you place within the actual js code will just be treated as string but if you pass those as argument, they end up in arguments variable in js side with correct typing and thus, can be interacted properly on the js side…
The post and docs you are referring to where about “robotframework-browserlibrary”, not “robotframework-seleniumlibrary”. You cant run both at the same time towards same browser instance and thus, cant mix and match keywords. If you are using Selenium, the keyword isExecute Javascript