Forum Discussion

lucieneven's avatar
lucieneven
Contributor
14 years ago

scripts of IE 64 bits can't play back on 32 bits machine

Hello,



By chance I just noticed that recorded script shows different between IE 32bits and 64bits.



'recorded on 64bits IE

Sub Test1

  Dim iexplore

  Dim table

  Dim page

  TestedApps.Page1.Run

  Set iexplore = Aliases.IEXPLORE

  Call iexplore.ToUrl("http://192.168.0.218:8080/jmapadmin/login.jsp?error=not_logged_in")

  Set table = iexplore.pageJmapAdmin.formTheform.tableLoginpanel

  Call table.cell1.textboxUsername.SetText("administrator")

  Call table.cell.linkJavascriptSubmit.textnodeLogin.Click(45, 0)

  Set page = iexplore.pageJmapAdmin1

  page.frameHeading.panelToolbarBox.panelM.panelToolbar.table.cell.linkLogout.Click

  page.Wait

  iexplore.IEFrame.Close

End Sub



'recorded on 32bits IE

Sub Test2

  Dim iexplore

  Dim textbox

  Dim page

  TestedApps.Page1.Run

  Set iexplore = Aliases.IEXPLORE

  Call iexplore.ToUrl("http://192.168.0.218:8080/jmapadmin/login.jsp?error=not_logged_in")

  Set textbox = iexplore.pageJmapAdmin.formTheform.tableLoginpanel.cell1.textboxUsername

  Call textbox.SetText("administrator")

  Call textbox.Keys("[Enter]")

  Set page = iexplore.pageJmapAdmin1

  page.frameHeading.panelToolbarBox.panelM.panelToolbar.table.cell.linkLogout.Click

  page.Wait

  iexplore.IEFrame.Close

End Sub



A while ago I searched the forum and hopefully find some similar posts. Sorry if somebody raised this concerning already.



We recorded and maintained the scripts with IE 64 bits, and now have problem run on IE 32 bits. Honestly, we didn't do this on purpose. Mostly because we never noticed the difference. Now the problem to us is we can't play back the scripts on the 32 bit machine where 64 bit IE can't be installed.



In this case, could you please give some advice here?



Thanks so much,



Lucien

5 Replies

  • Hello Lucien,



    According to the scripts you've posted, the difference is that the 64-bit script performs a mouse click over the login window, whereas the 32-bit script simulates an Enter keystroke. This difference is not critical for the playback.  

    Does your web application use any ActiveX controls? (The versions of ActiveX controls do depend on the bitness of Internet Explorer. See http://support.microsoft.com/kb/896457 )

    Are there any error descriptions in the TestLog?  They can provide more details on the failed playback.



    Regards, Artem.
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Since you're using the TestedApps object to run IE, it's possible that, since you developed the test project under 64 bit, it has as it's directory path "C:\Program Files (x86)\Internet Explorer\"



    On a 32 bit machine, this would show up only as "C:\Program Files\Internet Explorer\"



    Consider using Sys.OSInfo.Windows32bit to determine if your operating system is 32 or 64 bit and assign the TestedApps.Page1.Path accordingly based upon the result.
  • Hi Robert,



    I got the point well. Looking at Sys.OSInfo.Windows64bit, i have a quick question.



    I notice that this is a method of javascript. Because i'm using vbscript to maintain my testcomplete code, i am trying to find the equivalent method in vbscript. However, in vbscript, apart from FileSystemObject (FSO), there's no direct method or class to handle the system object. In terms of FSO, it doesn't help verify the windows 32 or 64 either. sign...



    So, do you happen to know where i can find the equivalent method to detect the Windows 64 or 32 by vbscript?



    Thanks for your time!



    Lucien
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Actually, it is not a javascript or a vbscript option, it is a piece of information available within the Sys object of TestComplete.  You should be able to use this property value no matter what scripting language you are using.