-
Notifications
You must be signed in to change notification settings - Fork 106
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
Keyword "Set Browser Timeout": allow NONE or EMPTY to reset to the default #3480
Comments
What would be default? The previous value timeout or the library default value (10seconds)? |
I would align the behavior with |
This one should not be difficult to implement, would you like do a PR? |
@aaltat @simonmeggle Would it be an idea to just use |
That is also one possibility. But we should apply the library import default value, instead we should the original imported value. |
@aaltat I've looked at the source code, but I don't see a variable for the default timeout. It looks like the default timeout is hardcoded in the init of the Browser class? |
Yes it is. But I think we should not restore the library default value always. We should restore what value user did give (or the library default if nothing was given) in the library import. So we should save the import value (somewhere) and then restore saved value if Example in below will restore the timeout to library default, 10s *** Settings ****
Library Browser
*** Tests ***
Example
Set Browser Timeout Second example in below will restore the timeout to 5s, the imported value. *** Settings ****
Library Browser timeout=5s
*** Tests ***
Example
Set Browser Timeout In both cases what ever value the Using |
Sorry for being so quiet... |
It depends how one expects keyword to work. It can have default value or it can return value from library import. The difference is that one can’t change the default value of the keyword, but one can change (if desired) library import value. Both are good solutions to implement and although I am favoring explicit solutions, in this case resorting the library import offers better features for the users. By using library import users will always get the default value user did choose and not the value library maintainers did choose. |
@aaltat I think that what @simonmeggle is proposing is to use |
The last known good value is the library import value. Like I proposed in #3480 (comment) if keyword is used without an argument then keyword will use library import value. In this way it would work like other keywords. |
Yes, @aaltat the library import value (or if not given, the default) is what the reset should set. |
In
Set Selector Prefix
, the argument${NONE}
or${EMPTY}
simply resets the prefix to the default (which is "empty").=> I hereby want to request to adopt the behavior of
Set Browser Timeout
to behave the same way:PS:
Perhaps also allow this one?
Set Browser Timeout default
The text was updated successfully, but these errors were encountered: