Forum Discussion

ArmandsBruns's avatar
ArmandsBruns
Frequent Contributor
12 years ago

Internet explorer 9 - in the object browser (index = 2), sometimes (index = 3)

Hi,



My test environment configuration are:

Windows 7 (64bit)

TestCompete 8.7

Internet Explorer 9





When I am using Internet explorer 9 then sometimes it shows in the object browser (index = 2) but sometimes it shows
the (index = 3).

As a result, it doesn't find the objects.



What configuration should make to work




If anyone can help?



  If (Options.IESettings.GetInternetExplorerMajorVersion > 7) Then

    NameMapping.CurrentConfigurationName = "IE8_9"

  Else

    NameMapping.CurrentConfigurationName = "IE6_7"

  End If

------------------------------------------------



I
know that can configure the following (Add a picture from a name mapping configuration: "NameMapping_Condition-Browser")

but I don't know how to make it works,  if sometimes index = 2 and sometimes index = 3

 

Armands

6 Replies

  • ArmandsBruns's avatar
    ArmandsBruns
    Frequent Contributor
    In NameMapping Configuration "IE8" (I create that index is 2)

    In NameMapping Configuration "IE9" (I create that index is 3)

    I tried to write a function, but got "Run time error" it doesn't find -> sys.process("iexplore")



    Function BrowserRun()

    Dim index1, index2, index3



    index1 = sys.process("iexplore")

    index2 = Sys.Process("iexplore", 2)

    index3 = Sys.Process("iexplore", 3)



    if index1.exists and index2.exists then

       Set indexType = "IE8"

    elseif index1.exists and index2.exists and index3.exists then

       Set indexType = "IE9"

    else

        

    end if

         

    Select Case IndexType

     

      Case "IE8"

     

        NameMapping.CurrentConfigurationName = "IE8"

     

      Case "IE9"

     

        NameMapping.CurrentConfigurationName = "IE9"

     

    End Select



    End Function
  • ArmandsBruns's avatar
    ArmandsBruns
    Frequent Contributor
    I solved the problem with index:



      Set index1 = Sys.Process("iexplore")

      Set index2 = Sys.Process("iexplore", 2)

      Set index3 = Sys.Process("iexplore", 3)



      If index1.exists and index2.exists and index3.exists then

      index2.Terminate()

      Call Sys.Refresh()

      End if
  • AlexeyK's avatar
    AlexeyK
    SmartBear Alumni (Retired)

    Armands,


    Internet Explorer creates helper processes automatically when you are browsing pages and using tabs. These processes have the ixplore name. To recognize multiple iexplore processes, TestComplete has to use indexes. This causes problems as the indexes can change when you are running tests.


    You can change this IE behavior by modifying the Windows Registry. For detailed instructions, see the following blog post:

    Web Testing - Disabling Multiple Processes of Internet Explorer 8

    or the Disabling Loosely Coupled Internet Explorer section in the Preparing Web Browser topic of the TestComplete 8 help.

    TestComplete 9 uses another approach for working with IE, so changing the registry is not so important.


    Anyway, I'm happy to hear you've solved the problem. :-)

  • The problem with this solution (searching in 3 indexes) is that it slows down the execution of our tests...

    I am still having trouble managing multiple instances of IE9. Modifying the registry key doesn't work, IE still runs multiple processes.