Forum Discussion

deepti_1's avatar
deepti_1
New Contributor
15 years ago

Object Spy identifying component name in different way

Hi,



I am testing a webpage devolped in richfaces Using Testcomplete 8  in Internet Explorer 7.

When i use the objext spy to determine the name of a control on the web page it gives the name in 2 different forms at different times .

Sometimes the name of a button is shown as

Sys.Process("iexplore").Page("http://projecturl.jsf").Table(0).Cell(1, 0).Table(0).Cell(0, 1).Form("commandPanelForm").Table("commandPanelForm_outerPanelGridCenterPanel").Cell(3, 0).Button("commandPanelForm_j_id275")



and sometimes as

Sys.Process("iexplore").IEFrame(0).Tab("Testing Page - Windows Internet Explorer").Window("Shell DocObject View", "", 1).Pane("Testing Page").Table(0).Cell(1).Table(0).Cell(1).Table(0).Cell(3).Button("Cancel").



I hav tried changing the Tree model to both Tree and Hybrid (in both the current and default project properties) and the Identification Attribute is set to ID.The object Tree model is set to Tree.But still it shows the same behaviour.



Is there any specific settings which i need to do in order to get the object browser giving the name of the component on screen in a fixed  way??



Thanks

Deepti.



5 Replies




  • Hi Deepti,





    The first name is generated with the use of the Web Testing plug-in, but the second name can be seen when the MSAA plug-in is used. Let's take a look at the following example:





    If you open the "http://www.automatedqa.com/products/" page in IE 8 (don't have IE7 at hand right now) and enable the Web Testing plug-in, you will see the following name for the "Try it" link below TestComplete's logo:





    NameMapping.Sys.Process("iexplore").Page("http://www.automatedqa.com/products/").Form("aspnetForm").Panel(1).Panel(0).Panel(4).Panel(1).Table(0).Cell(0, 0).Panel(1).Link(0).Image("tryit_gif")





    If you enable the MSAA plug-in, and enable the "Internet Explorer_Server" item in the list of window classes accepted by MSAA, you will get a different name:





    NameMapping.Sys.Process("iexplore").Window("IEFrame", "AutomatedQA Products - Windows Internet Explorer", 1).Window("Frame Tab", "", 1).Window("TabWindowClass", "AutomatedQA Products - Windows Internet Explorer", 1).Window("Shell DocObject View", "", 1).Pane("AutomatedQA Products").Table(0).Cell(0).Link(1).Graphic("Download a fully functional trial")





    The nature of the difference in my example is the same as in yours.

    To avoid names confusion, I recommend that you disable all items in the "Open Applications | MSAA | List of accepted windows" list in your project settings (not if the Default Project settings) if you are not using MSAA for your testing purposes.
  • shrikantkh's avatar
    shrikantkh
    Regular Visitor
    Hi Alex,

    I am facing same issue my application, I tried to perform steps as per your suggesstion. but still I am facing same issue.

    Can you let me know if anything that needs to done?



  • Hello Shrikant,





    Please post here the two different names you are seeing for the same control - this will help me understand the possible reasons for the issue.

    Thanks!
  • Hi Alex,



    I'm facing the same issue, for all these years when I spy a popup window, I got the following name. Now suddenly the name has been changed to a new name, hence all my previous tests are faling.



    Old pop up window name : Sys.Process("IEXPLORE").Window("#32770", "*", 1).Window("Static", "*", 2)

    New pop up window name: Sys.Process("iexplore").IEFrame(1)



    Could you please tell me how to turn off the unnecessary options. I tried disabling MSAA options, but no luck.



    (I'm have used Tree model = "Tree" , and Identification attribute = "Name" for all my projects.



    Hope you will get back to me soon.



    Thanks

    Manel

  • Hello Manel,





    Since you opened a support case with the same question, I replied to you directly via e-mail. However, I did not hear anything back so far.





    In case my e-mail was lost, below is my response - please take a look:



    The two objects you are referring to are actually different objects, not the same window. The IEFrame object is a window with the IEFrame class, this window represents the main IE window with tabs and pages inside. And the other one is actually a popup window shown by a web browser.





    So, do I get it right that you are using the Finder Tool in TC, catch the popup window, and it tells you that this is an IEFrame object? Could you record a short video demonstrating this situation? You can use Jing, a free screen recorder, to capture the video:

    www.techsmith.com/jing/free/







    Thanks!