Python Wait Until Keyword Succeeds

Is there any way to use Wait Until Keywork Succeeds in Python file.

I have a button click like below:

browser.type_text(\\"css=iframe[id='newvault'] >>> input[id='vaultSearch']\\", account_name)

due to delayed loading i want to use wait until keyword succeeds, but i am not able to do so.

imported library

from robot.libraries.BuiltIn import BuiltIn
rpa = BuiltIn()
#rpa.wait_until_keyword_succeeds('3 x', '5 s', "browser.type_text("css=iframe[id='newvault'] >>> input[id='vaultSearch']", account_name)")

the above code is not working, is there any other way to do this?

Why not use playwright waits to make sure that element is available? wait_for_elements_state for example.

1 Like

yes i am using playwright for now, but just wanted to know if there is a way to do like this. I want to try using “Run Keyword And Ignore Error” also

Looking at those keywords, I would say you need to implement your own function for this with try/catch

ohh okay, so those builtin keywords can’t be used for python file.