JTAF-ExtWebDriver
JTAF-ExtWebDriver copied to clipboard
Update GUIProperties to have a getPropertyValueOrDefault
So that we can avoid exception handling code in tests and widget class implementations, we should support a getPropertyValueOrDefault(...) method.
This came up in discussion of #24
See #59
Arise, dead thread! Arise, and send people spam!
@bryantrobbins I looked at #59 but I'm not sure it's what you were hoping for. As I read it, getStringOrDefault() as implemented there will attempt to read the property with a given key and return the string "Default value" if it's not present. Is this what you wanted? I had initially assumed that you meant something like in XCore, where getStringOrDefault("abc", "mySpecifiedDefault") would check for key "abc" and return "mySpecifiedDefault" if it was not in the context (or in this case, the properties file). Personally I would prefer the latter behavior.
I agree with you, @SonOfFlyingPig. Maybe consider re-opening this one?
Edit: Obviously it's already open (was looking at the "referenced issue" message above).