kk6 Absent Member.
Absent Member.
583 views

Visual Test On error handling.

Jump to solution

Currently using Visual Test 17.5, Is it possible to have error handling only for that particular line or that particular error message. 

 

Actually what happen is we need to check particular screen is available or not. sometime that particular screen wont be available so i have given on error go to label.

when ever there is some other error message like object missing , error handling i have added is getting applicable and goes to infinite loop.

 

0 Likes
1 Solution

Accepted Solutions
AndySchott Absent Member.
Absent Member.

RE: Visual Test On error handling.

Jump to solution
If you want to check if a control exists, you can use the Exists test step for that.

To create one, select the Insert -> Control From menu item, then chose how you'd like to identify the control (make sure to identify the parent of the control you are checking, not the control itself). After identifying the control, select the "Exists" method from the Insert Method dialog box. In the Properties window for the Exists test step, enter the locator for the control you are searching for (I can't remember if the Locator property has an Identify button or not - if it doesn't, manually open the Identify dialog, identify the control you are checking for, copy the locator out of the dialog, and paste it into the Locator property).

if the timeout for the Exists method is 0, Silk Test will check for the control and return immediately.

You can use the "st_LastReturnValue" reserved variable to get the return value of the Exists method.

Alternatively, you can also create an If test step, and add a condition that checks for the existence of a control. I can't remember if this was implemented in Silk Test 17.5 or a later release, however.

Andy
0 Likes
4 Replies
AndySchott Absent Member.
Absent Member.

RE: Visual Test On error handling.

Jump to solution
If you want to check if a control exists, you can use the Exists test step for that.

To create one, select the Insert -> Control From menu item, then chose how you'd like to identify the control (make sure to identify the parent of the control you are checking, not the control itself). After identifying the control, select the "Exists" method from the Insert Method dialog box. In the Properties window for the Exists test step, enter the locator for the control you are searching for (I can't remember if the Locator property has an Identify button or not - if it doesn't, manually open the Identify dialog, identify the control you are checking for, copy the locator out of the dialog, and paste it into the Locator property).

if the timeout for the Exists method is 0, Silk Test will check for the control and return immediately.

You can use the "st_LastReturnValue" reserved variable to get the return value of the Exists method.

Alternatively, you can also create an If test step, and add a condition that checks for the existence of a control. I can't remember if this was implemented in Silk Test 17.5 or a later release, however.

Andy
0 Likes
kk6 Absent Member.
Absent Member.

RE: Visual Test On error handling.

Jump to solution

I have done the same but what happen is like when we are looping it we are getting object is not available message. Please see the above the screenshot

0 Likes
Highlighted
Micro Focus Contributor
Micro Focus Contributor

RE: Visual Test On error handling.

Jump to solution
Hi,

It is difficult to debug an issue via a screenshot. Please log a new incident with us and we will be more than happy to investigate further.

You can log an incident via: supportline.microfocus.com/mf_incident_add.aspx or by mailing supportline@microfocus.com

thanks,
John
0 Likes
kk6 Absent Member.
Absent Member.

RE: Visual Test On error handling.

Jump to solution
Thkq John... Did the same.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.