Forum Discussion

lucieneven's avatar
lucieneven
Contributor
14 years ago

TestExecute failed to find object "table" under 64 bits IE

Hello,



On a 64bits machine, with TestExecute, we met a problem to run script recorded
on IE 64bits.



As enclosed 2011-12-02 4-09-26 PM.png, the 64 bits IE explorer was launched successfully, but error popup as "Object required: 'table'".



Go back to script,



  table = iexplore.pageJmapAdmin.formTheform.tableLoginpanel

  Set textbox = table.cell.textboxUsername



We doubted that it might be because TestExecute can't identify the IE 64bits script, because seems IE 32 bits script doesn't have table as an object.



As can be seen from 2011-12-02 4-10-55 PM.png, we verified that invoked IE explorer was 64 bits instead of 32 bits. Here, we can't figure out why TextExecute can't find the 'table' as an object.



Enclosed 2011-12-02 4-12-15 PM.png is a screenshot of the scripts. And *.mht is a test result report.



Please shed some light here, many thanks!



Lucien
  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)

    Hello Lucien,


    It looks like the table variable in your script is missing the Set statement required to assign an object to it.

    Please try modifying your script in the following way:

    Set table = iexplore.pageJmapAdmin.formTheform.tableLoginpanel


    Please let us know whether this helps.

    Thank you.

  • Hello,



    thanks for your feedback. Indeed, i commented the previous code and changed as advised, result is still the same. It is just blocked by the table error.



    Please take a look at the screenshot, thanks again!



    Lucien
  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)

    Hello Lucien,


    Please note that the sample code from my previous message refers only to the table variable assignment that lacks the Set statement (please see the attached P1.png image). Sorry for confusing you.

    Could you please modify the rest of your code back as it used to be? That is, uncomment the original script line, comment the edited script line (please see the attached P2.png image) and check whether the issue persists. If it does, what error message is posted to the test log?

    Thank you.

  • Hello,



    Thanks for your concerning. I rolled back the changes to the previous and rerun the code. Like before, as can be seen from the picture 2011-12-06 9-43-52 AM.png, runtime error: object required: 'table'.



    From what i see, the script was blocked at roughly line 10. For some reason, TestComplete can't find the object 'table' where it can simulate to enter login username and password etc.



    Enclosed 2011-12-06 9-46-49 AM.png is for the information.



    One thing i don't understand is this script was recorded on a physical 64bits machine where script can be run perfectly. Problem happens to another virtual machine which is also 64bits.



    Back to the 'table', the table has been set in the code. The only difference is on virtual machine IE version is 8 whereas on physical machine IE version is 9. Does it matter?



    Please advise some, great thanks!



    Lucien
  • Hello,



    To verify whether it's issue of different version of browser, I just upgraded IE from version 8 to version 9 on the virtual machine. Now the browser has the same version between recording and playback. Unfortuantely, it doesn't help.



    Looking back to the code, one thing i can't understand is, as can be seen from 2011-12-06 11-00-43 AM.png, the error points to line 7. Indeed, it's looking for the object 'table', at least it appears at line 10. Not sure what's going on. Can you help clarify here, thanks!



    Lucien
  • Yes and no, :)



    Yes: it's the same code. I used the same test script.



    No: here my problem is TestComplete found the right browser but can't go ahead. The proper browser has been invoked, so 32/64 is not a problem any longer. However, one object 'table' can't be found by TestComplete. So far, i can't figure out why...



    Thanks for your time,



    Lucien
  • Hello,



    This is for the information that i tried recorded one more time the script after having commented out the old script, and this time it works.



    It's really weird, because as can be seen from the 2011-12-06 2-24-07 PM.png, there's no change on the code itself.



    Anyway, thanks for your help. All in all, i get to know that TestExcute should work well under 32 and 64 bits.



    I'll continue to figure out what happens to my old script. :)



    Lucien
  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)

    Hello Lucien,


    I’m glad to hear that your re-recorded test runs successfully.


    Still, I hope the following notes may come in handy if you face the same issue again:



    1. If a VBScript run-time error - "Object required: 'var_name' " - occurs in your script, please make sure that the var_name variable stores a reference to an object which exists, is valid, is recognized as an object and is not null. To do this, you can use breakpoints to pause the script execution upon reaching the target script line and the Locals or Watch List panel to examine the values assigned to your script variables. You can find detailed information on these and other TestComplete debugging features in the Debugging Tests Help section.



    2.

    Looking back to the code, one thing i can't understand is, as can be seen from 2011-12-06 11-00-43 AM.png, the error points to line 7. Indeed, it's looking for the object 'table', at least it appears at line 10. Not sure what's going on.


    You can double-click the error message in the test log to jump to the script line that has posted that error message. To learn more about this feature, please see the Jumping to Test Command That Posted Message Help topic. Please note that this feature is available only for TestComplete, not TestExecute.



    3.
    The only difference is on virtual machine IE version is 8 whereas on physical machine IE version is 9. Does it matter?


    Different versions of web browsers may have different object hierarchies. A test created for one version of a web browser may fail if played back with another web browser version. To learn how to create tests that work with all supported web browsers, please see the Cross-Browser Scripting Help topic.


    Good luck with your testing.