UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21. Read more.
UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21.Read more.
Vice Admiral Vice Admiral
Vice Admiral
2613 views

What does the "Warning" in the Result Details mean from object.WaitProperty "visible", "True", 60000

When you have a statement that checks for the "visible" property using the .WaitProperty method, what does it mean when you get this "Warning" in the results file or results viewer?

The code is like:

object.WaitProperty "visible", "True", 60000

You run the script on one Android device and no Warnings, no Errors. Run the same script on another Android device and still no Errors but with a "Warning" in the Result Details pointing to the Step Name with the .WaitProperty.

Thanks.

Gilbert

 

0 Likes
3 Replies
Commander
Commander

This means you have Smart Identification Property for that object set to 'True'. So whenever UFT is not able to recognize an object and if the Smart Identification Property is set to 'True', it will invoke a series of algorithms to identify the element SMARTLY, but will send a warning status to the report suggesting Smart identification was used to identify this element.

Two options to counter this:

Disable warning for Reporter.Reportevent for all test executions progrmatically

or

Set Smart Identification to 'False', this will fail the test next time and you can add additional properties for that object to be recognized at all times.

Hence as a best practice it is always recommended to disable smart identification when adding objects to repository

[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted)

Vice Admiral Vice Admiral
Vice Admiral

Hi BlbinC,

Thanks for the info.

All the objects I added in the Object Repository has Enable Smart Identification set to False.  However, I just checked the Test Run dialog in Settings and saw that the checkbox to Disable Smart Identification is unchecked. With this checkbox now checked, I will rerun my test.

The weird thing is that when I run my test on those newer faster mobile devices, I don't get this Warning in the Result Details. This Warning shows up only when I run the test on slower devices.

The line of code causing the Warning is:

object.WaitProperty "visible", "True", 60000

I could not find any documentation explaining why a Warning here is getting triggered so I thought maybe the wait of 60000 is not enough (my guess)?

Thanks.

Gilbert

 

0 Likes
Admiral
Admiral

Gilbert,

You guessed it correctly.

A warning in this case means that the 'visible' property value didn't match the expected value  'True',  even after waiting for 60000 milli seconds and the result of this step is 'False'. Note that the Test still passes but with a warning at the Step Level.

blnResult = object.WaitProperty("visible", "True", 60000)

blnResult here is False. 

If you don't like warnings in your reports, you can suppress it by using the Reporter.Filter method.

 

_____________________
Rajkumar Rajangam
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.