-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Library internal argument conversion with Robot Framework API #4109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Exposing argument conversion publicly would be a good idea. Not exactly sure what's the best API for that, though. Anyway, something that could be added in RF 5.0. |
Could you @aaltat clarify this request a bit more? I checked the linked Browser library issue and notice it was fixed already. Was this issue not relevant or was there some existing way to handle conversion? I removed this from RF 5.0 scope because we'd like to get that release out ASAP and because I'm not sure what we actually should even do to address this. If there's something concrete to do, this issue can be added to RF 5.1 scope. |
I don't actually understand the whole need for argument conversion in Browser side. AFAIK it uses from robot.libraries.BuiltIn import BuiltIn
def kw1(arg: int):
assert arg == 42
def kw2(arg):
BuiltIn().run_keyword('kw1', arg) I can use it as follows and *** Test Cases ***
Example
kw2 42
|
When keyword originates from the same library, arguments are not problem. But keyword is not from same library arguments are problematic because args can be almost anything and then it get pretty complicated how that works. Or is there some shortcut to happiness which I do not see? |
It seems that #4942 proposed the same thing and it was implemented in RF 7.0. |
@aaltat agreed. Closing. |
Browser library has similar run on failure support as SeleniumLibrary has, but Browser library supports arguments with the Register Keyword To Run On Failure keyword. But because registered keyword arguments can be almost anything, Browser library can not define typing for the arguments and therefore Robot Framework can not perform automatic conversion to the arguments. There is an issue which demonstrates the problem when we do not perform the conversion.
Therefore I was thinking to do conversion inside of the library. I think it can be done if the run on failure keyword is one of the browser library keywords, because then library knows the argument specification. But the argument conversion is pretty complex problem to do, so I was thinking that I could use some Robot Framework code. Is there some entry point which would allow to do the conversion easily?
The text was updated successfully, but these errors were encountered: