JTAF-ExtWebDriver icon indicating copy to clipboard operation
JTAF-ExtWebDriver copied to clipboard

Update GUIProperties to have a getPropertyValueOrDefault

Open bryantrobbins opened this issue 10 years ago • 3 comments

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

bryantrobbins avatar Apr 29 '14 16:04 bryantrobbins

See #59

kood1 avatar Aug 09 '14 19:08 kood1

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.

mmlinford avatar May 16 '16 17:05 mmlinford

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).

bryantrobbins avatar May 16 '16 18:05 bryantrobbins