Elegant Error Handling -Not Generating an Error
All the documentation says this should not generate an error.
p = CurrPage.FindElement("//font[.='Purchase Types']")
w = p.WaitWindow("*", "Open*", -1, 10000);
Log.Warning("Found Purchase Date' Header")
Log.Warning("No purchases are posted for this member")
except Exception as e:
myErrMessage = JCCommon.capture_error(e)
Then I went to an "easy" example from the website.
And wrote this on off script. and still throws an error message into the log.
p = Sys.Process("Notepad") # Waits for the window for 10 seconds w = p.WaitWindow("*", "Open*", -1, 10000) if w.Exists: w.Activate Log.Picture(w, "Open dialog picture") else: Log.Warning("Incorrect window")
Is there a configuration I am missing. or are my fingers too fat for the keyboard.
This sounds like a small issue, but people testing don't want to see errors in the logs. (That is an indicator of a successful test.)
And what is the error that is logged for on off script ?
/Alex [Community Champion]
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.