1
votes

So, at the beginning of test I'm opening browser using UFT:

'strWebString = "iexplore.exe"
SystemUtil.Run strWebString, strWebUrl

After that I try to login into my website, and this is moment when strange sitiuation appears:
1. When only IE is running everything is ok
2. When IE is running, and in the background there is chrome browser opened UFT can't identify object. When I try to locate it on site from repository window, there appear message:

The selected object cannot be found in the application. Check that the application is open to the correct page or window and that the object and its parents do not have parameterized values.

The same information appears when only chrome is opened. But when I close chrome, and IE is running at this moment, objects are recognized correctly.
I tried to play with smart identification on and off, change add-ins etc. In older versions (QTP) this problem didn't exist.

IE Version: 10.0.9200.17116
Update Version: 10.0.21

UFT 12.01 Build 1112

6
Try highlighting the Browser object from the object-repository, which browser is being highlighted? Chrome or IE? - Motti

6 Answers

2
votes

If you want to operate only on a specific browser family then you can add some browser family-specific identifiers to your Browser object in the Object Repository, something like application version:=internet explorer.*.

1
votes

Ok, It's all about chrome extension. In chrome go to extensions menu and disable HP Unified Functional Testing Agent

0
votes

Most of the time I've found that if you go to the Record>Record and Run Settings menu, then on the Web tab choose the top radio button that says "Record and run test on any open browser" and on the web tab, "Record and run test on any open Windows-based application", it should fix the problem for you. I recommend choosing the top radio button for any tab available in these settings.

Also, if you are going to SystemUtil.Run to launch IE, I recommend using the full path to the 32 bit version of IE which is usually C:\Program Files (x86)\Internet Explorer on 64 bit machines and C:\Program Files\Internet Explorer on 32 bit machines. You don't have to worry about it really on 32 bit machines, but 64 bit machines should have the full path.

0
votes

I have recently talked with an HP presale employee about bringing UFT into the company which I work at and addressed her with the same question.

She said that UFT cannot handle an open browser that is not a part of the test/action (unless you configure it).

0
votes

Can you please check if your browser object is having creationTime as property.

If your QTP is identifying chrome as one of the browsers then its possible that it's searching for objects in chrome.

Generally when we record Browser objects its creation time is set to 0, thus whichever Browser Object (IE or Chrome) is opened first is where the QTP search for objects and as a result if IE opens first its creation time is 0 and there is no problem with object recognition, but if chrome is opened first its creation time is 0 and QTP is not able to find objects in Chrome.

To know more about creationTime Property: http://relevantcodes.com/creationtime/

You might have faced this issue in newer versions because old version didn't have support for chrome and thus it was not identified as one of the browsers, but newer versions support chrome so as per QTP it has multiple browsers opened if both chrome and IE are opened together.

Please let us know if this doesn't solve your problem.

0
votes

For QTP/UFT the default Browser is IE. That's why the properties are collected in IE but not in Chrome. IF you want to work on Chrome then use this code, App.Test.Settings.Launchers("Web").Browser = "CHRO"