Forum Discussion

vinodtc's avatar
vinodtc
Contributor
14 years ago

Is the script written in Testcomplete is browser version dependent?

Hi,



We are using  DOM model to identify the objects, pages and windows and written script for IE7.0 with TestComplete8.0. The script which is written in IE 7,0 is not working in IE 8.0. We are creating IE instance and navigating the url by using the below VB script code.


 


Set objExplorer = CreateObject("InternetExplorer.Application")


  objExplorer.visible = True


  objExplorer.navigate sourceURL


  Sys.Process("IEXPLORE").IEFrame(0).Maximize


  objExplorer.navigate “http://www.google.com


above code is creating only one instance and that can be seen in “Object Browser” of TestComplete with IE7. But when same code is executing with in the machine which is having IE8.0, two instances are creating and other operations are stopping because of second instance. Could you please suggest how to eliminate the second instance?


 

Object identifying with Object Spy:


 

code for IE7.0 : Sys.Process("IEXPLORE").Page(“*”).document.all.Item("overridelink")


 

Code for IE8.0: Sys.Process("IEXPLORE", 2).Page(“*”).document.all.Item("overridelink")


 

Please find the SS of  Object Browser with IE7.0 and IE8


Note: We are using Winodows XP professional as OS. Does the OS matters?



Regards,

Vinod

  • Hi Allen,

    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <meta content="Word.Document" name="ProgId" />
    <meta content="Microsoft Word 11" name="Generator" />
    <meta content="Microsoft Word 11" name="Originator" />



    I appreciate your quick and exact solution. This is solved
    my problem.


    Thanks much


    Vinod

  • sandhu97's avatar
    sandhu97
    Occasional Contributor
    Hi All,



    I am undergoing this same problem. Can any body suggest me how these 2 links fix this issue? I cant get my head aroung this. I already have a script using IE7. What changes I have to do to make it IE8 compatible?



    Thanks in advance.
  • Hi,



    Can any body suggest me how these 2 links fix this issue?


    I'm not sure what 'these 2 links' you mean because there's only one in this thread except for Google in the first post's example. Anyway, this will prevent IE from spawning multiple processes which will solve problems when the page you work with appears under a different IE instance each time you navigate to it making your scripts unreliable.



    I already have a script using IE7. What changes I have to do to make it IE8 compatible?


    Disable LCIE. That's all. Nothing else you need to do to make IE7 tests compatible with IE8.