Elegant Error Handling -Not Generating an Error
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Elegant Error Handling -Not Generating an Error
All the documentation says this should not generate an error.
PYTHON
try:
p = CurrPage.FindElement("//font[.='Purchase Types']")
w = p.WaitWindow("*", "Open*", -1, 10000);
if w.exists:
w.Activate
Log.Warning("Found Purchase Date' Header")
else:
Log.Warning("No purchases are posted for this member")
except Exception as e:
myErrMessage = JCCommon.capture_error(e)
Log.Error(myErrMessage)
It does
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.)
- Labels:
-
Script Tests
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
IThe process "Chrome1" was not found. 13:39:58 Normal 0.00
