I am sorry to hear you continue to have problems getting this to work properly. Did you reuse my function without changing anything. What I mean is did you just copy-paste this :MouseClick(ArtOfTest.WebAii.Core.MouseClickType.LeftClick, 35, -2, ArtOfTest.Common.OffsetReference.AbsoluteCenter);
If so, this is probably the reason it doesn't work. Let me explain:
In Select.MouseClick(ArtOfTest.WebAii.Core.MouseClickType.LeftClick, 35, -2, ArtOfTest.Common.OffsetReference.AbsoluteCenter);
35 and -2 are coordinates. They define where you want to click relative to the center of the Select
In our case we want to click on the expand button of a combobox. So we have to know the correct coordinates. It easy with WebUI Test Studio because it lets you visually define the coordinates. However, you will have to calculate the coordinates yourself. One way to do it is to use a screenshot of the element. You can open this screenshot in Paint or a similar application which shows coordinates and calculate the coordinates of the expand button from there.
Two things to keep in mind when you do this: keep the size (i.e. the pixel count) of the orignal screenshot otherwise you won't be able to make correct calculations. Also in Paint the coordinate system is such that (0,0) is the Upper-Left corner of an image. However, we use ArtOfTest.Common.OffsetReference.AbsoluteCenter
i.e. the center of the image is (0,0). Check out screenshot 1 to see what I mean.
If you have incorrect results for your expand button nothing will happen. You are able to compile and execute the function which tells us it's working. However, only clicking on the expand button of a combobox results in a visual action - if you click on any other part of the combobox nothing happens.
Please make sure you have the correct coordinates for the click (this might involve some trial-and-error) and let me know whether it still won't work.
Hope to hear from you soon!
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking
system and vote to affect the priority of the items