Forum Discussion

Stacim's avatar
Stacim
New Contributor
7 years ago

Unable to obtain item's rectangle

I am using a keyword test and I'm getting the following error "unable to obtain item's rectangle"  And it shows the following information.  Does anyone know how to resolve this:

 

An issue has occurred. To resolve it, contact our Support Team. Please include a step-by-step description of how to reproduce the issue. Tested object: Aliases.browser.pageA2qaLsacOrgTasksDailyAspx.form.imageAces2LogoPng (Sys.Browser("chrome").Page("https://a2qa.lsac.org/Archive/ApplicantArchive.aspx").Form("aspnetForm").Panel("mastercontainer").Panel("Heading").Panel(0).Panel(0).Panel("logodiv").Panel(0).Panel(0).Link("ctl00_ACES2Logo").Image("Aces2_Logo_png"))

An issue has occurred. To resolve it, contact our Support Team.

Please include a step-by-step description of how to reproduce the issue.

Tested object:
Aliases.browser.pageA2qaLsacOrgTasksDailyAspx.form.imageAces2LogoPng
(Sys.Browser("chrome").Page("https://a2qa.lsac.org/Archive/ApplicantArchive.aspx").Form("aspnetForm").Panel("mastercontainer").Panel("Heading").Panel(0).Panel(0).Panel("logodiv").Panel(0).Panel(0).Link("ctl00_ACES2Logo").Image("Aces2_Logo_png"))

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I usually see that in my own application testing when an object that I'm attempting to interact with has been destroyed in memory by the time TestComplete gets to it...  This does not mean that the object is not present on screen, just that the instance of that object may have been destroyed and recreated, hence causing a reference error.

     

    The way I've resolved this is two fold.

     

    1) I've made sure that I handle timing of the application and onscreen refreshing of the AUT.  Check for page loads, object refreshing, etc., and add appropriate "Wait" technology (Page.Wait(), WaitNNN, etc) to wait for components and objects to load before interacting with them.

    2) If a page refreshes after performing an action, the in memory cache for NameMapping might need refreshed.  Add a call to "RefreshMappingInfo" on the page to reset that cache before the action that gives you your error.

     

    If this doesn't help, more information may be needed.  Please post a screenshot of your keyword test actions you're executing and/or the script code you're executing as well as a screenshot of the Object Browser showing the objects you are attempting to interact with.