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

Desktop.Mouse clicks wrong element?

1 Answer 27 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Zach
Top achievements
Rank 1
Zach asked on 17 Nov 2014, 08:08 PM
Hello!
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...
http://imgur.com/1kP9LRv

1 Answer, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 20 Nov 2014, 06:51 PM
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:

ActiveBrowser.RefreshDomTree();


Regards,
Cody
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
Cody
Telerik team
Share this question
or