Object coordinates an IDs

Ask general questions here.
MichaelM
Posts: 3
Joined: Wed Aug 23, 2017 11:08 am

Object coordinates an IDs

Post by MichaelM » Thu Jan 11, 2018 3:21 pm

Hi,

My question is: when I record a test I get some objects in repo and for any action I get executable code, like this:

Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'SiteName.Ctl00ContentPlaceHolder1Ctl00Loginfor3' at 25;7.", repo.SiteName.Ctl00ContentPlaceHolder1Ctl00Loginfor3Info, new RecordItemIndex(7));
repo.SiteName.Ctl00ContentPlaceHolder1Ctl00Loginfor3.Click("25;7");
Delay.Milliseconds(200);

As far as I understand, this code clicks button with ID Ctl00ContentPlaceHolder1Ctl00Loginfor3. So my question is what means 25;7? Is it relative coordinates off this button? Is so, what coordinates I should use if I manually add new item to repo and want to manually add code to perform some action with this item? Can I use MyRepoObject.Element.Location.X, MyRepoObject.Element.Location.Y?

Thanks.

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: Object coordinates an IDs

Post by asdf » Thu Jan 11, 2018 3:35 pm

Hi Michael,

Those coordinates are just the action spots of the specific action. That means that the click will be performed on those coordinates within the button.
In your case the button will approximately be clicked like in the following picture.
ActionSpot.png
ActionSpot.png (1.92 KiB) Viewed 313 times
When a action will get manually created, I think the default value of the action spot is "Center". And I would not change this, just if there is a special reason for it.

Hope that helps.