Forum Discussion
AlexeyKolosov
14 years agoStaff
Hi Rikki,
You cannot handle errors posted to the test log the same way as exceptions. However, you can handle the OnLogError event to block some errors (if that's what you need). To learn how to do this, please see the Creating an Event Handler for the OnLogError Event help topic.
However, it seems to me that you can actually avoid this if you specify more precise search criteria for the object (e.g. include the Enabled, Visible or VisibleOnScreen properties in the list of properties used for objects recognition). Just calling the Click method on random objects to cause errors is not a very reliable practice.
You cannot handle errors posted to the test log the same way as exceptions. However, you can handle the OnLogError event to block some errors (if that's what you need). To learn how to do this, please see the Creating an Event Handler for the OnLogError Event help topic.
However, it seems to me that you can actually avoid this if you specify more precise search criteria for the object (e.g. include the Enabled, Visible or VisibleOnScreen properties in the list of properties used for objects recognition). Just calling the Click method on random objects to cause errors is not a very reliable practice.
Related Content
- 4 years ago
- 2 years ago
- 6 years ago
- 8 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 6 days ago