Forum Discussion

jinithlal's avatar
jinithlal
Contributor
13 years ago

Unable to Capture Page() objects in IE

Hi,

While running Script application is waiting for Page("http://somedomain.com/somefolder/somefile.aspx") object even the page is displayed in the browser and crashes saying object not found. The same script is running fine in other machines.

What could be the possible issue? Please help

Note: The script is not a recorded one, created using VBScript



thank you

Jinith


7 Replies

  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)

    Hello Jinithlal,


    Please give us a bit more information on your issue:


    1. What Internet Explorer version are you using?

    2. Do you use the Wait method or the ToUrl method in your test to wait until the required page gets loaded in the web browser?

    3. Is the Make Page object a child of the browser process option enabled in your project? To check this, please right-click your project in the Project Explorer, select Edit | Properties, then select Open Application | Web Testing from the list on the ensuing page and find the Make Page object a child of the browser process option in the Web Testing Options page.

    4. What is the exact text of the error message posted to the test log when your test fails to find the needed object?

    5. Are you using name mapping in your test?


    Also, could you please post here your script (or a sample script that demonstrates the problem)?


    Thanks in advance.

  • The page is developed in Silverlight.



    1. Internet Explorer 8.0

    2. I am not using wait, as I start the test with the page open in the browser. It is trying to perform some actions on the page

    3. The Make Page object a child of the browser process option is enabled.

    4. Unable to find the Object Page("https://somepage/somefolder/somefile.aspx"). See additional information

    5. I am Not using name mapping in the test



    The following is a sample subroutine I am using, I am getting the error while running this



    Sub example

    Sys.Process("iexplore", 2).Page("https://somepage/somefolder/somefile.aspx").Form("form1").SlObject("ActivityServiceContainer").SlObject("mainScrollViewer").SlObject("Option0").Click

    End Sub



    Note: This Object I obtained by capturing a Radio Button in the page using  Test Complete.
  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)

    Hello Jinithlal,


    Thank you for the provided information.


    Could you please check how many instances of the Internet Explorer process are displayed in the Object Browser, and to which process instance does the required web page belong?

    Does the same error occur if you refer the Internet Explorer process without using its index in your script? For example:



    Sub example

    Sys.Process("iexplore").Page("https://somepage/somefolder/somefile.aspx").Form("form1").SlObject("ActivityServiceContainer").SlObject("mainScrollViewer").SlObject("Option0").Click

    End Sub


    Thank you.

  • Hello Julia,


    Thank you for helping.


    Two instances of the Internet Explorer process
    are displayed in the Object Browser, and Both Processes are having the same page object as their child ( Process("iexplore") and Process("iexplore", 2) )


    But If I use Process("iexplore") object, it is not capturing the object in any machines. The indexed Process is working provided only one IE window is open while executing test.


    That is why I used Process("iexplore", 2) in the scripts, Object capture feature also giving the indexed Process object. 


    And, I often use Test Execute 8 for executing test often, And I noted that Test Complete never gave this error while running the test.


    regards


    Jinith

  • Hi,

    It is not because of the index change in Process, It is not detecting the page, even though the index is right.
  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)

    Hello Jinithlal,


    Could you please follow the instructions below?

    1. On the machine where you get the "Unable to find the Object" error, open the registry editor. To do this, please click Start and select Run. In the Run dialog box, type regedit and press ENTER.

    2. Go to the HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main section and check whether it contains the TabProcGrowth key.

    3. If the key exists, could you please check whether its value is greater than zero?


    Thanks in advance.