This is a migrated thread and some comments may be shown as answers.

GetRectangle() failing inside of an IFrame - FireFox

5 Answers 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Zach
Top achievements
Rank 1
Zach asked on 09 Jan 2015, 06:57 PM
Hello Telerik Team!

I have an element which I need to mouse over, and simply invoking the OnRollOver event doesn't work.

All other browsers seem to have no issue, but this line in FF doesn't run properly.
Rectangle eleRect = hoverOver.GetRectangle();

The co-ordinates returned in FF are as follows, which causes the mouse to move into the top left corner.
X: -2147482642, Y:-2147483308

As the title mentions, this is happening inside of an IFrame, which I'm able to find without any issue.

5 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 14 Jan 2015, 02:42 PM
Hi Zach,

What type of control is hoverOver?

Please give us a bigger snippet  of your code so we can reproduce it and give you a solution.

You can also create some sample project against some public site and send it to us.

Hope to hear from you soon.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Zach
Top achievements
Rank 1
answered on 15 Jan 2015, 03:02 PM
Element hoverOver = iFrame.Find.ByExpression(new HtmlFindExpression("InnerText=Payment History","style=~cursor"));
            if (ab.BrowserType == BrowserType.Safari)
                iFrame.Actions.InvokeEvent(hoverOver, ScriptEventType.OnMouseOver);
            else
            {
                Rectangle eleRect = hoverOver.GetRectangle(); // Fails in FF.
                int eleX = eleRect.X + eleRect.Width / 2;
                int eleY = eleRect.Y + eleRect.Height / 2;
                man.Desktop.Mouse.Move(new Point(eleX - 1, eleY - 1), new Point(eleX, eleY));
            }
            Thread.Sleep(1000);
            iFrame.RefreshDomTree();
            Element mileageCol = iFrame.Find.ByExpression(new HtmlFindExpression("InnerText=Mileage", "style=~cursor"));
            iFrame.Actions.Click(mileageCol);

What the element looks like -- > http://i.imgur.com/DaJTsFs.png
the DOM -- > http://i.imgur.com/gEzKXZd.png

I'm not the web developer, but I'm assuming this is generated code... The elements shown in the DOM image are all contained inside the payment history div.

As shown in my code snippet, I have the control coded as a simple "Element" is there something else I should try?
0
Boyan Boev
Telerik team
answered on 20 Jan 2015, 08:48 AM
Hi Zach,

I cannot find a constructor for SIlverlight Point which accepts two arguments (Manager.Desktop.Mouse.Move(new Point(eleX - 1, eleY - 1), new Point(eleX, eleY));). I cannot compile the code you have sent me.

Is this working on your side at all?

Can you capture a screen recording of the problem and send it to me to study? Jing is a good free screen recorder for up to 5 minutes of recording.

Is there any possibility you can grant us a direct access so we can reproduce the issue?

Hope to hear from you soon.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Zach
Top achievements
Rank 1
answered on 22 Jan 2015, 07:09 PM
I am not using a "Silverlight" point, it is a System.Drawing.Point.

The code works fine in Chrome and IE, and I have a separate workaround for Safari.

I'm trying to get permission from my boss to share video of the site with you.

I think I'm clear to send you larger portions of my test code, but it would have to be privately, not on the forum.
0
Boyan Boev
Telerik team
answered on 27 Jan 2015, 12:54 PM
Hi Zach,

I will send you a DrobBox link to your mail where you can upload a larger portion of your code.

Thank you.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Zach
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Zach
Top achievements
Rank 1
Share this question
or