Detect Flash element/shape at screen location

Ranorex Spy, Recorder, and Studio.
jrm
Posts: 1
Joined: Tue Nov 22, 2011 2:19 pm

Detect Flash element/shape at screen location

Post by jrm » Tue Nov 22, 2011 11:00 pm

Hi,

I have a flash game, I need to validate that as a shape/element travels over a fixed location on screen and the user click a button.

Is this possible? I can see shape locations in Spy but not sure how to add this location to the validation recording.

Thanks,

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Detect Flash element/shape at screen location

Post by Support Team » Wed Nov 23, 2011 12:08 pm

Hi,

to validate the screen location you can use following code snippet:
Element el = "/RanoreXPath/To/Your/Shape";
Validate.IsTrue(el.ScreenLocation == new Point(x, y));
where "/RanoreXPath/To/Your/Shape" is the RXPath to your shape and x/y are the coordinates you can see in Ranorex Spy.

Regards,
Tobias
Ranorex Support Team
.
Image