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

User.Click not working

1 Answer 51 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 27 Jul 2011, 01:48 PM
I have a test which clicks a RadRibbonButton on a RadRibbonView:

var button = app.Find.ByAutomationId("MyButton");
//Thread.Sleep(3000);
button.User.Click();

It only works if I uncomment the Thread.Sleep and that only works if its more than 2000.

Am I doing something wrong?

Thanks,
Jon

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 29 Jul 2011, 09:40 PM
Hi Jonathan,

What the symptom sounds like is that the button is not ready to be clicked for some reason (we can't see your app so we have no clue why). Is the button disabled and then enabled when something happens? That's what it sounds like to me is that the test script is outrunning your application. Can you record a video of the script running with the delay so that it works? Maybe there's something else in the UI that is changing that we can watch for to see when the button is clickable. If it's changing from Disabled to Enabled we can wait for it to be enabled before clicking on it. Or maybe there some window overlaying the button preventing us from clicking on it? Jing is a pretty good and free screen recorder.

Best wishes,
Plamen
the Telerik team
Check out the Test Studio roadmap to find out more about the new performance testing functionality coming in our R2 2011 release this September!

Have you looked at the new Online User Guide for Telerik Test Studio?
Tags
General Discussions
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or