cancel
Showing results for 
Search instead for 
Did you mean: 

There was an attempt to perform an action at point (1439, -108), which is out of the window bounds.

SOLVED
Highlighted
Contributor

There was an attempt to perform an action at point (1439, -108), which is out of the window bounds.

My code:

Aliases.Inventor.refresh
Call Aliases.Inventor.MainWindow.MDIClient.Click(Aliases.Inventor.ViewClientArea2.width-25,12)

I want to use a relative coordinate to click a button that can't be spied by testcomplete. But the test failed in another PC.

Addtional info:
The window size is (1464, 842); screen rectangle: the left top corner is (216, 144), the right bottom corner is (1680, 986).
The screen coordinates of the point is (1655, 36).
 
So I don't know how the testcomplete calculate the coordinate?
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Contributor

Re: There was an attempt to perform an action at point (1439, -108), which is out of the window boun

Thanks, the issue can't appear now. If it still be there, I'm glad to have a try.

View solution in original post

25 REPLIES 25
Highlighted
Community Hero

Re: There was an attempt to perform an action at point (1439, -108), which is out of the window boun

Hi,

 

> how the testcomplete calculate the coordinate?

.Left and .Top object's properties are relative to the parent container's one.

.ScreenLeft and .ScreenTop are relative to the desktop.

Does this help?

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Contributor

Re: There was an attempt to perform an action at point (1439, -108), which is out of the window boun

Thanks @AlexKaras , I know these one. As you see, the click action don't execute the coordinate what I expressed, so it failed. It is a confuse question for some testers.

Highlighted
Community Hero

Re: There was an attempt to perform an action at point (1439, -108), which is out of the window boun

Hi,

 

So... Is the problem solved or not?

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Contributor

Re: There was an attempt to perform an action at point (1439, -108), which is out of the window boun

No, thanks, I will record it here. Maybe someone will suffer same stable question.

Highlighted
Community Hero

Re: There was an attempt to perform an action at point (1439, -108), which is out of the window boun

Hi,

 

Am-m-m... Still not sure that I got your answer...

 

> I will record it here.

If it is just for the record, then OK.

If you are looking for the solution, then this is simple - put a breakpoint on the problematic line with a call to .Click() (or add debug logging right before it if you don't have TestComplete installed on the box where the problem occurs), analyse the values of all participating objects (MDIClient, ViewClientArea2), calculate click coordinates manually and verify that TestComplete clicks at correct point, consider where the click must be done and consider what coordinates of what objects must be used to obtain the required values.

Hope, this will help.

 

P.S.

> Aliases.Inventor.refresh

Considering that you are using Aliases (which is right) and if some aliased object is recreated while it is used by test code, I would recommend to consider .RefreshMappingInfo() method. (See documentation for the description of the difference between .Refresh() and .RefreshMappingInfo())

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Contributor

Re: There was an attempt to perform an action at point (1439, -108), which is out of the window boun

Thanks, 

    It's a problem that I want to solve it.

    But I have tried some times, it's hard to understand, I get a negative coordinate. If I get the answer, I will notice for it. 

Highlighted
Community Hero

Re: There was an attempt to perform an action at point (1439, -108), which is out of the window boun

> Call Aliases.Inventor.MainWindow.MDIClient.Click(Aliases.Inventor.ViewClientArea2.width-25,12)

My wild guess is that the MDIClient object was recreated while test code was using it (for example, the form was closed amd reopened) and thus test code reused it from the cache (see description and code sample in the documentation for the .RefreshMappingInfo() method).

 

I would try to change the code to this:

Call Log.Message(Aliases.Inventor.MainWindow.MDIClient.Top) ' remove after debug

Call Aliases.Inventor.MainWindow.MDIClient.RefreshMappingInfo()

Call Log.Message(Aliases.Inventor.MainWindow.MDIClient.Top) ' remove after debug

Call Aliases.Inventor.MainWindow.MDIClient.Click(Aliases.Inventor.ViewClientArea2.width-25,12)

and check if it helps.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Contributor

Re: There was an attempt to perform an action at point (1439, -108), which is out of the window boun

Yeah, I have guess it so I refresh test object's parent. But the object always the same, I don't operate it. And You support a good way for me to debug. I will have a try, thanks!

Highlighted
Community Hero

Re: There was an attempt to perform an action at point (1439, -108), which is out of the window boun

> so I refresh test object's parent.

To say the truth, I am not sure if refreshing parent's objects tree refreshes Aliases cache. That is why I recommended to try to .RefreshMappingInfo() for the object itself.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
New Here?
Join us and watch the welcome video:
Top Kudoed Authors