sean_ng
7 years agoOccasional Contributor
catch error then perform specific task
Hi,
during playback i get this error :
There was an attempt to perform an action at point (X, Y) which is transparent or out of the window bounds.
i know what is causing this error :
...
- 7 years ago
Hi,
Try/catch will not work because there is no JScript runtime error. Thus there is nothing to catch. The error posted is a 'logical' error posted by TestComplete. This kind of errors can be handled using the OnLogError event handler in TestComplete.
However, I would recommend to use the scrollIntoView() native web method to scroll the web object without interacting with scrollbars.
E.g.:
if (!obj.VisibleOnScreen)
{
obj.scrollIntoView(true); // small 's' because this is native name
if (!obj.VisibleOnScreen)
obj.scrollIntoView(false);
}
obj.Click(); // Capital C because this is TestComplete's method