Super Contributor.
Super Contributor.

UFT 12.02 working with multiple tabs in Chrome



I am working on a project that requires me to use Chrome browser for some automation tasks and I'm having some issues with identifying the browser when there are more than one opened tabs.

If I use the creationTime property to identify the last opened tab it takes very long to identify it.

Set oDesc = description.Create
oDesc("micClass").value = "Browser"
oDesc("version").value = "Chrome.*"
Set chObj = Desktop.ChildObjects(oDesc)
creationTime = chObj.count - 1

Set br = Browser(oDesc,"creationTime:="&creationTime&"")

Set oDesc = nothing
Set chObj = nothing

If I use the openurl property it works fine when then are less than 4 tabs opened. If there are more than it fails completely. Is there a limitation that I'm not aware of ? 

Set br = Browser("openurl:=http://domain.test*")

Any suggestion would be greatly appreciated.

Accept as solution and give kudos to the author if the information helped you solve your problem.
Tags (2)
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.