Absent Member.. GeorgeCC Absent Member..
Absent Member..
213 views

On Line Expert Day Question - How do I deal with objects that don't get recognized consistently?

I write a test. It runs fine. I then run it from QC. It fails with an unrecognized object. I load it into UFT and it runs fine. The AUT hasn't changed.

 

Failures can be on anything. Most problematic are buttons that navigate to places. When the button doesn't work, the navigation -- and the test -- fail. Also problematic are the failures to find an object that is part of a checkpoint.

 

Browser Sync statements don't help.

 

I have mitigated this to some extent by writing "Do While" loops whenever I encounter this. Click the button, test the result, if I don't get the result, I click again, loop, loop, until it works.

 

But this is a pain. Each time there is a failure I have to edit the test. Please understand that these failures are *NOT* due to a change in the AUT.

 

How can I improve the recognition?

0 Likes
9 Replies
Absent Member.. _Evelina_ Absent Member..
Absent Member..

Re: On Line Expert Day Question - How do I deal with objects that don't get recognized consistently?

Hello,

 

Could you please peovide more deatils about your AUT, on which technologies it is based on.

What is the QTP version and teh browser you are using for testing.

In order to refresh teh web support let me suggest you to use teh following method:

Browser.refreshWebSupport .

 

Thank you and Regards,

Evelina

If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution
0 Likes
Absent Member.. vzamoraz Absent Member..
Absent Member..

Re: On Line Expert Day Question - How do I deal with objects that don't get recognized consistently?

Hi George,

 

    In order to clarify some points:

    1-The unrecognized objects come because the page has not navigate to the right place? Or this even happened when the object is present in the page?

   2-You find this object not found error randomly (some times at the beginning others at the end) or they appears progressively on the script(as the script progress the errors come)?

   3-From UFT>Tools>Options>Test Run. What do you have selected for Run Mode?

 

4-From UFT>Tools>Options>Web>Advanced.  What do you have selected for Replay type?


 

5-What patch do you have installed for UFT?

6-What version and patch level you have installed for QC?

7-When you execute directly with UFT(working scenario) is the same test stored in QC or a test stored locally?

8-The problem appears only with the application you are testing?

 

 

Best Regards.

 

HP support

If you find that this or any post resolves your issue, mark it as an accepted solution.

 

 

0 Likes
Absent Member.. GeorgeCC Absent Member..
Absent Member..

Re: On Line Expert Day Question - How do I deal with objects that don't get recognized consistently?

Out AUT is a web-based application with an MSSQL backend. Backbone.js is the technology. 

 

I cannot try your suggestion today, but I appreciate it and will try it.

0 Likes
Absent Member.. GeorgeCC Absent Member..
Absent Member..

Re: On Line Expert Day Question - How do I deal with objects that don't get recognized consistently?

Application Name: HP Unified Functional Testing
Version: 11.52.467
License Key: Seat
Host Name: QTP4-Win-7
Maintenance Number:
ALM Connectivity Version: 11.52.341.0

Installed Features
GUI Addin
.NET
ActiveX
Flex
Java
Visual Basic
Web
WPF
WPF-Silverlight

Installed Components
Component Version
ActiveScreenPane 0.0.0.0
ApplicationAreaEditor Addin
AvalonEdit.AddIn 11.50.0.0
AvalonEdit.AddIn 0.0.0.0
C# Binding 11.50.0.0
Code Editor 0.0.0.0
Debug Pad Wrapper Extension addin for UTT 11.52.0.0
EditorVisualGenerators Binding 0.0.0.0
HP QTP Property Tabs 0.0.0.0
HP Shell Services 11.50.0.0
HP.QTP.ActionDialogCommands 0.0.0.0
HP.QTP.AnalogUIAddInCommands 0.0.0.0
HP.QTP.AnalogUIAddInCommands 0.0.0.0
HP.QTP.AutoParameterization 0.0.0.0
HP.QTP.CheckpointCommands 0.0.0.0
HP.QTP.Commands.DataDriverCommand 0.0.0.0
HP.QTP.Commands.ErrorPaneCommands 0.0.0.0
HP.QTP.Commands.OpenDotNetSpyCommand 0.0.0.0
HP.QTP.Commands.OpenSpyCommand 0.0.0.0
HP.QTP.Commands.OpenSpyCommand 0.0.0.0
HP.QTP.Commands.RecordRunSettingsCommand 0.0.0.0
HP.QTP.Commands.TestSettingsCommand 0.0.0.0
HP.QTP.Commands.VersioningAndBaselines 0.0.0.0
HP.QTP.Commands.VirtualObjectCommands 0.0.0.0
HP.QTP.Common 0.0.0.0
HP.QTP.Conditions 0.0.0.0
HP.QTP.ConfigurationUI.GUITestingPanel 0.0.0.0
HP.QTP.ConvertBcToScriptedCompCommand 0.0.0.0
HP.QTP.FileCommands 0.0.0.0
HP.QTP.IBAAddInCommands 0.0.0.0
HP.QTP.InsertCommands 0.0.0.0
HP.QTP.LLUIAddInCommands 0.0.0.0
HP.QTP.ObjectRepositoryCommands 0.0.0.0
HP.QTP.ToolsCommands 0.0.0.0
HP.QTP.ToolsCommands 0.0.0.0
HP.QTP.WithGenerator 0.0.0.0
HP.UFT.BPT 11.50.0.0
HP.UFT.ConfigurationUI 11.50.0.0
HP.Utt.AboutDialog 11.52.0.0
HPUttIdeCommands 11.52.0.0
Open Test For BackEnd
QTP Automation UI Service 0.0.0.0
QTP DataTable Addin
QTP Debugger addin based on UT Debugger 0.0.0.0
QTP FileDialog 0.0.0.0
QTP Information Panes 0.0.0.0
QTP Project System 0.0.0.0
QTP Project Template 0.0.0.0
QTP Resources Addin
Qtp SearchAndReplace Addin
QTP UI Customization 0.0.0.0
RecordRun Addin 0.0.0.0
Script View 0.0.0.0
SharpDevelop 4.1.3.0
SharpDevelopUFTPOnly 4.1.3.0
Start Page 11.50.0.0
TestFlowPane Addin
Toolbox Addin
UFT ALM 11.50.0.0
UFT Data Explorer 11.50.0.0
UFT File Dialog (UFT Only) 11.50.0.0
UFT File System 11.50.0.0
UFT Only Resources Addin 11.50.0.0
UFT Project System 11.50.0.0
UFT Properties 11.50.0.0
UFT Resources Addin 11.50.0.0
UFT Search and Replace Addin 11.50.0.0
UFT UICustomization Addin 11.50.0.0
UFT Web Browser Extension Addin 11.50.0.0
Usage Data Collector 11.52.0.0
UTT ALM Connection Addin 11.52.0.0
UTT Configuration UI 11.52.0.0
UTT Connection Addin 11.52.0.0
UTT Debug Basic implementation addin for UTT 11.52.0.0
UTT File Dialog 11.52.0.0
Utt Help Mechanism Addin 11.52.0.0
Utt Help Menu Addin 11.52.0.0
Utt Parser Addin 11.52.0.0
Utt Resources Addin 11.52.0.0
UttBookmarkPad 11.52.0.0
UttCommon Addin 11.52.0.0
UttErrorListPad 11.52.0.0
UttOutputPad 11.52.0.0
UttTaskListPad 11.52.0.0
UttToolbox Addin
VbScript Binding 0.0.0.0

 

0 Likes
Absent Member.. GeorgeCC Absent Member..
Absent Member..

Re: On Line Expert Day Question - How do I deal with objects that don't get recognized consistently?

Thank you for the response. Here are the answers to your questions:

 

    1-The unrecognized objects come because the page has not navigate to the right place? Or this even happened when the object is present in the page?

>> Object is present and visible to my eye. I have put in commands to take screen shots when there is an error and the screen shot show the object that UFT says it can't find.

 

   2-You find this object not found error randomly (some times at the beginning others at the end) or they appears progressively on the script(as the script progress the errors come)?

>> Not sure how to answer. I would say randomly.

 

   3-From UFT>Tools>Options>Test Run. What do you have selected for Run Mode?

>> "Normal." But of course when run from QC it is forced to "Fast."

 

4-From UFT>Tools>Options>Web>Advanced.  What do you have selected for Replay type?

>> Event

 

5-What patch do you have installed for UFT?

>> See separate response, please. I pasted it in before seeing this reply.

 

6-What version and patch level you have installed for QC?

>> Pasted at the end of this response.

 

7-When you execute directly with UFT(working scenario) is the same test stored in QC or a test stored locally?

>> On QC

 

8-The problem appears only with the application you are testing?

>> Of course -- but that probably means I don't understand the question. Where else would I see it other than on what I am testing?

 

---

QC INFO:

 

HP Quality Center
Quality Center 11.00 Starter Edition

Component Build

OTA Client 11.0.0.8178
User Interface 11.0.0.8178
WebGate Client 11.0.0.8178
Test Run Scheduler 11.0.0.8178
Site Administration Client 11.0.0.7484


Extension Version

Sprinter 11.0.0.8178

0 Likes
Highlighted
Absent Member.. vzamoraz Absent Member..
Absent Member..

Re: On Line Expert Day Question - How do I deal with objects that don't get recognized consistently?

Thank you very much for the information George.

 

On point 8 I had to elaborate more my question, my apologies.
I mean, if you made a simple test with a Google browser(www.google.com) example record a navigation, performing click on some links are you able to get the same not found object message running this sample test from QC?

 

Lets try this:
1-From UFT>Tools>Options>Web>Advanced
Set Replay Type to Mouse
If issue persist after this set back to Event in Replay Type

 

 

2- Open the test directly with UFT go to UFT>Tools>Options>Test Run
Set this to "Fast" and let us know if it runs properly or if you can see also same error as the one shows in QC.

 

 

HP support

If you find that this or any post resolves your issue, mark it as an accepted solution.

0 Likes
Absent Member.. GeorgeCC Absent Member..
Absent Member..

Re: On Line Expert Day Question - How do I deal with objects that don't get recognized consistently?

You wrote:

On point 8 I had to elaborate more my question, my apologies.
I mean, if you made a simple test with a Google browser(www.google.com) example record a navigation, performing click on some links are you able to get the same not found object message running this sample test from QC?

 

I will get to your suggestions tomorrow. But to try to give you a quick idea of what works directly from UFT and failes when run from QC, consider this:

 

Here is the UFT code. Runs fine with UFT...

1-Window("Program Manager").WinListView("SysListView32").Activate "Mozilla Firefox"
2-Browser("Google").Page("Google").WebEdit("q").Set "waitstaff"
3-Browser("Google").Page("waitstaff - Google Search").WebButton("btnG").Click
4-Wait 0,450
5-Browser("Google").Page("waitstaff - Google Search").Link("Images").Click
6-Browser("Google").Page("waitstaff - Google Search").WebElement("WebElement").Check CheckPoint("WebElement")
7-Browser("Google").Page("waitstaff - Google Search").WebElement("Images").Check CheckPoint("Images")

 

But when I run it from QC I get these errors:

 

Description:
WebElement:
Cannot identify the object "WebElement" (of class WebElement). Verify that this object's properties match an object currently displayed in your application.


Description:
Run Error:
Cannot identify the object "WebElement" (of class WebElement). Verify that this object's properties match an object currently displayed in your application.
Line (6): "Browser("Google").Page("waitstaff - Google Search").WebElement("WebElement").Check CheckPoint("WebElement")".

 

Yes, I know that this is somethng of a "fake" example. If I increase the time in line 4 it will probably run from QC.

 

These failures happen because the link in Line 5 failed to work. There was no error. The script didn't stop. But we didn't get the navigation requested by the link to "Images" so the checkpoints failed.

 

0 Likes
Absent Member.. GeorgeCC Absent Member..
Absent Member..

Re: On Line Expert Day Question - How do I deal with objects that don't get recognized consistently?

The command "Browser.refreshWebSupport" returns the error "Doesn't support this property or method."
0 Likes
Absent Member.. bobando Absent Member..
Absent Member..

Re: On Line Expert Day Question - How do I deal with objects that don't get recognized consistently?

Hi GeorgeCC,

The method should be used with the entire object description, for example:

Browser("Google").RefreshWebSupport

Thanks
HP | Unified Functional Testing Engineer

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

(Posts and opinions made here are my own and do not reflect the opinions of my employer HP in any way)
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.