Desktop.Mouse clicks wrong element?

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

    Posted 17 Nov 2014 Link to this post

    I am using TTF not test studio, this test runs fine in IE, but I'm having difficulties with Firefox.
    At this point in the test I am attempting to click the "Update Result" button, which is passed in by ID. Instead, the click fails and clicks the copy button.
    This is all happening inside of an IFrame.

    Here is the code I am using..

               //Clicking update result button.
                Element updateBtn = iFrame.Find.ById("btnUpdateResult");
                man.Desktop.Mouse.Click(MouseClickType.LeftClick, updateBtn.GetRectangle());

    the "Copy" button has an ID of btnCpy and at no point in my program do I pass that in...

    here is an image showing the page...

  2. Cody
    Cody avatar
    3354 posts

    Posted 20 Nov 2014 Link to this post

    Hello Zach,

    Without a complete copy of all your code it's difficult to determine exactly why you are getting this behavior. It could be something like a stale copy of the DOM. Try refreshing the DOM like this, then grabbing the iframe again before looking for the button to click on:


    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top