1
votes

In one of our test machines, 2 browsers are counted though only 1 is displayed, causing UFT not to identify and enter value to objects since we are using RegEx:

Browser("title:=.*").Page....

We are using the below line to initialize IE:

InvokeApplication "C://Program Files/Internet Explorer/IEXPLORE.EXE"

What is the workaround for this?

UFT version is 12.02.

Thanks in advance!

3
not much info to help you out. I am assuming you did take the count of browser (which you got as 2). Why dont you try using creationtime instead of Title ? - Pranav
Check in task manager if there is an extra iexplore.exe process running or not. - Gurmanjot Singh
@Pranav - all of our scripts use title, it would take much time to update all and might impact the scripts. I am first searching for a workaround though that is my last option. Thanks - Glenn C
@Kira - There are other instances of iexplore.exe, some with *32 in the task manager. Is this a Windows OS problem? - Glenn C
That's why you are facing the problem...just before running the script, kill all the instances of iexplore.exe. Try it and let me know if it worked for you. No, this is not an OS problem. - Gurmanjot Singh

3 Answers

0
votes

I would first close all the open instances of IE by using:

SystemUtil.CloseProcessByName("iexplore.exe")

And then open the new instance using:

SystemUtil.Run "iexplore.exe","TestURL","C:\","",3

Check this link for more information on SystemUtil.

0
votes

Follow below steps:-

1) close all the process of IE using WMI object.

Set ObjWMI= GetObject("WInmgmts:")
Set oProcess = ObjWMI.ExecQuery("Select * from win_32 Process")
For each p in oProcess 
    if p.name = "iexplorer.exe" Then p.terminate
Next

2) webUtil.deleteCokkies

3) Then open your application using systemUtil.run..

Hope it will help

0
votes

Thanks for all your input. I learned a lot from you. I already found the root cause. It was after all not the multiple open browsers but a timing issue with the log in page for one of the machines. The email address text box object is visible however, it cannot be identified by UFT immediately that is why I added a sync point to wait max of 4 minutes until object.Exist(240)=true. Thank you all!