Ask a Question

Scripts does not execute properly on another PC with internet explorer 11: Need to remove IE 32 bit

SOLVED
smaillou
Occasional Contributor

Scripts does not execute properly on another PC with internet explorer 11: Need to remove IE 32 bit

Hi,

Both PC are with windows 7 pro with IE 11.

Script that I create on one PC does not execute properly on another machine.

I have discover that on the other machine I need an extra index on the web page. Sometimes not. It changes randomly

 

The first PC

Sys.Browser("iexplore").Page("http://" + IP + "/").Panel(0).Panel(1).Link(0).Click()

The second one

Sys.Browser("iexplore").Page("http://" + IP + "/", 1).Panel(0).Panel(1).Link(0).Click()

 

On the second one I have 2 process internet explorer. one 32 bit and another 64 bit.

iexplore.exe

iexplore.exe *32

 

How do I get rid of the 32 bit version??

 

Thanks. 

Help is appreciated.

22 REPLIES 22
smaillou
Occasional Contributor

Hi all,

 

I have found a good workaround. Each object that I access on the web page I do a find. And this solve my issue of the page index.

  propStr  = ["namePropStr", "Visible", "VisibleOnScreen", "ObjectType"]
  valueStr = ["logout.jsp", True, True, "Link"]
  adminPageLogoutObj = Sys.Browser("iexplore").Find(propStr, valueStr,60,True)
  adminPageLogoutObj.Click()

This way I dont have to manage IPs, page names or indexes and the code is more robust but need to write more lines.

 

I would of like to deactivate the 32 bits version of iexplore.exe but this will suffice.

 

Thanks for your help.

 

Stéphane.

 

tristaanogre
Esteemed Contributor

Glad to here it.  I would make one change to your code, though.

 

 propStr  = ["namePropStr", "Visible", "VisibleOnScreen", "ObjectType"]
  valueStr = ["logout.jsp", True, True, "Link"]
  adminPageLogoutObj = Sys.Browser("iexplore").Find(propStr, valueStr,60,True)
if (!adminPageLogoutObj.Exists){
  throw Error('Could not find the desired object')
}
adminPageLogoutObj.Click()

This will help prevent problems where the object does not exist when you go to find it.  You should also, possibly, look into using FindEx instead of just Find because FindEx includes a WaitTime property to allow the object to render before attempting to interact with it.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
smaillou
Occasional Contributor

Hey,

 

Thanks for the tips. I will now use  findEx

 

I am using a while not Exists with timeout to wait for the object. But it is a bit cumbersome just to do little thing. And I dont want to stop the script when there is an error.

 

def verifyLoginStatus():
  Log.Enabled = False
  propStr  = ["namePropStr", "Visible", "VisibleOnScreen", "ObjectType"]
  valueStr = ["logout.jsp", True, True, "Link"]
  
  timeout = time.time() + 60 # 1 minute timeout
  while not Sys.Browser("iexplore").Find(propStr, valueStr,60,True).Exists:
    if time.time() > timeout:
      Log.Error("verifyLoginSuccess() Timeout: {:+.2f} seconds".format(time.time() - timeout).format()) 
      return FAIL 
    Log.Warning("Logout link is not ready")
    aqUtils.Delay(500)

  adminPageLogoutObj = Sys.Browser("iexplore").Find(propStr, valueStr,60,True)

  result =  aqObject.CheckProperty(adminPageLogoutObj, "contentText", cmpEqual, "Logout")  
  Log.Enabled = True
  return result  

 

 

cancel
Showing results for 
Search instead for 
Did you mean: