GetRectangle() failing inside of an IFrame - FireFox

6 posts, 0 answers
  1. Zach
    Zach avatar
    33 posts
    Member since:
    Sep 2014

    Posted 09 Jan 2015 Link to this post

    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.
  2. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 14 Jan 2015 Link to this post

    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
     
  3. Zach
    Zach avatar
    33 posts
    Member since:
    Sep 2014

    Posted 15 Jan 2015 in reply to Boyan Boev Link to this post

    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?
  4. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 20 Jan 2015 Link to this post

    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
     
  5. Zach
    Zach avatar
    33 posts
    Member since:
    Sep 2014

    Posted 22 Jan 2015 in reply to Boyan Boev Link to this post

    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.
  6. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 27 Jan 2015 Link to this post

    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
     
Back to Top