Wait for condition doesn't work

Hi, I would like to understand why the method below does not work in RPA Framework.

BROWSER.wait_for_condition('return document.readyState == “complete”, timeout=60)


Hi, by not working what do you mean? Is it not waiting or throwing and error?
You also missing apostrophe at the end of “complete”, maybe that will fix that?

Hello, the command returns None when run by Jupyter Notebook, when run in devtools console it works and returns true. In the original version the code is with the apostrophe.

So it works but not as you except. I believe reason would be that wait_for_condition is wrapper function. In devtools console you are running JS. If you try

js = 'return document.readyState == "complete"'
var1 = browser_lib.wait_for_condition(js, timeout=60)
var2 = browser_lib.execute_javascript(js)

You will get


as output.