Highlighted
Absent Member.
Absent Member.
404 views

UFT 12.51 object interaction failure mid test

Hi,

Have anyone else ran into the issue where objects are recognized normally, but sometimes mid test it temporarily stops being interacted with?

In the Java application that I am testing, there are some buttons that when I run each test case individually, everything works fine. When I run all test cases together, sometimes UFT will seem to still recognize the button, but fail to click the button., even though it was working when the test case was ran individually, and it also works in the other test cases that ran.

An example case is that when I close a document, a pop up asking if the user wants to save appears. UFT recognized the dialog and buttons, and in my code I tell UFT to press "No". This works most of the time, but sometimes the button will not be pressed. When I try to see if UFT recognizes the object, it still does. If I try to run the testcase that had the issue by itself, it also works.

Thanks for any Help

0 Likes
3 Replies
Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

Re: UFT 12.51 object interaction failure mid test

Hi,

Have you ensured that the focus is on the pop up dialog? I sometimes find that during a batch run the application under test can lose focus and an object may fail to get recognised.

I have found that building in a line of script to ensure focus is on the window/dialog being interacted with allows the batch runs to complete successfully.

As an example you could use:

Window("APPLICATION NAME").Dialog("DIALOG NAME").Activate
var_Exist = Window("APPLICATION NAME").Dialog("DIALOG NAME").WinButton("No").Exist(100)
Window("APPLICATION NAME").Dialog("DIALOG NAME").WinButton("No").Click

Hope this helps.

Carl

0 Likes
Absent Member.
Absent Member.

Re: UFT 12.51 object interaction failure mid test

Hi,

Thanks for the reply.

I did try to give focus back to the dialog by using .activate , but it didn't seem to work.

I think what the issue feels like is that the object is activated and visible, but UFT somehow can't interact with it or cannot find the object. If you stop the test, and try to use the Object Repository or Object spy to find/identify the object, UFT does find it.

Highlighted
New Member..
New Member..

Re: UFT 12.51 object interaction failure mid test

I'm having the same issue with UFT 15.52. Let me/us know if this seems to be the same issue.

  1. This mostly happens when running in batch mode but can occur randomly when running tests manually.
  2. The issue seemed to have started to occur when I modified my tests from using a Shared Object Repository with a fixed "absolute path" -eg. c:\UFT\object repository.tsr - to one using a "relative path" that's included in the UFT --> Tools --> Options --> GUI Testing --> Folders: "Search List".

When the problem starts occuring when running the tests manually, I can see that the there is a question mark "?" on the object repository listed in the "Solution Explorer". If I try to open it from the solution explorer, I get a message stating that the file cannot be found. The test is able to see it again if I close the test, wait a bit, and repoen it. If I try to reopen it right away, there is a chance that it still won't be able to see it.

The SOR is on a local drive and is always accessible.

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.