TestStack / White

DEPRECATED - no longer actively maintained
Other
1.02k stars 486 forks source link

TestStack.White.UIItems.UIActionException : Window didn't respond, after waiting for 5000 ms #288

Open jeehakim opened 9 years ago

jeehakim commented 9 years ago

I have TestStack.White.UIItems.RadioButton And I called either .Click() or .Select() to click/select the radio button, either time I get TestStack.White.UIItems.UIActionException : Window didn't respond, after waiting for 5000 ms

Why is .Click() and .Select() causing this Exception?

Do I have to create Exception handler every time I do mouse action or at least these mouse click actions?

pgurbal commented 9 years ago

Hi,

if you'd like to click/select the RadioButton, perhaps you could use

RadioButton.SetValue(true);

Cheers, Pavol

jeehakim commented 9 years ago

Thanks. That works without causing any exception. .Focus() also works. But why would more meaningful .Click() or .Select() on RadioButton or CheckBox would cause this exception? Where can I find good documentation for White (and SpecFlow)?

JakeGinnivan commented 9 years ago

Unfortunately there is no good documentation for White, the best doco are the tests in this repository. There is doco at http://docs.teststack.net/white/index.html but the styles in the menu are kinda busted.

We are in the process of migrating to a new docs site, but that will not improve them. White really needs the community to jump in and start helping out. I personally do not have time for the large amount of work that needs to be done with White, so until someone steps up and helps out it will not be moving very fast.

jeehakim commented 9 years ago

Gotcha.

Please correct me if I'm wrong...if I want to use open source Cucumber on Windows .NET Desktop Application, I have to go with SpecFlow and if I want to automate the GUI objects (with mouse and keyboard actions), then White + Inspect is just about the only/best choice?

And is AutoIt any good/better? How is it different?

I'd appreciate any insight.

JakeGinnivan commented 9 years ago

Unfamiliar with AutoIt, from an open source point of view I think White is probably the best option, it isn't like it doesn't work, it just needs people using it at their work to help make it better for everyone else. I am not using it, hence my involvement has dropped. If I end up on a project using it again then my involvement will likely go up again.

For cucumber, I much prefer another TestStack project https://github.com/TestStack/TestStack.BDDfy

It is much nicer to use than SpecFlow and it outputs the test results in a Cucumber format.

JakeGinnivan commented 9 years ago

BDDfy is also pretty active, I did a release about 15 minutes ago with some fixes.

jeehakim commented 9 years ago

Thanks for your insight. I'm not in a position to code in C# nor an expert in it. I'm in a position to look for an open source test automation framework for developers on windows desktop applications. If we decide to go with this route of using SpecFlow or BDDfy with White, then either I or my developers will have some involvement. I'll let you know.

Any good training or at least the setup documentation on BDDfy? I'd certainly prefer a visual training like youtube (which has several videos on SpecFlow).

JakeGinnivan commented 9 years ago

There is a pluralsight video on specflow and also one on TestStack in general

BDDfy is very simple in comparison to White. It is not that White is that hard to use, it is UI automation is something that should be chosen carefully. It is a lot of effort to get right whatever you use, and many teams fail.

An idea I am warming to a lot more is subcutaneous testing instead of UI automation which are done against your viewmodels instead of your views. Sure you do not use the UI, but that is normally not where the bugs are.

I then use UI automation for a small number of end to end smoke tests, not requirements verification.

The development process is then quite easy, work with testers to come up with the gherkin tests, turn those into BDDfy tests while developing the feature. If updates need to be made to tests just give the name of the test and the new criteria or changes and the develop updates existing tests. http://robdmoore.id.au has some decent blog posts on these approaches and links to some videos.

jeehakim commented 9 years ago

@JakeGinnivan does BDDfy require White? According to your comment, it does not. If not, how does it find UI control object for performing mouse & keyboard actions? Or is BDDfy NOT capable of performing the UI mouse & keyboard actions? Or is BDDfy more of an alternate framework for SpecFlow rather than White? I read the article about the subcutaneous testing. Are we talking about unit test automation here?

Please note that I'm strictly speaking about the Windows .NET desktop application here. Thanks!

rvipandey commented 7 years ago

Hello, After Click on Button, My code throws error TestStack.White.UIItems.Button rep = window.Get(SearchCriteria.ByAutomationId("Reports")); rep.click() rep.click() worked for me and giving me new screen window but throwing error

Additional information: Window didn't respond, after waiting for 5000 ms Check the Errorcode property of the exception determined the HRRESULI return by the COM project.

Anyone can please help me where i am missing my code?

udhayakiran commented 7 years ago

Hi,

I got the following error after the click on Open Button in File Explorer Window.

An unhandled exception of type 'TestStack.White.UIItems.UIActionException' occurred in TestStack.White.dll

Additional information: Window didn't respond, after waiting for 5000 ms.

Can anyone Please help me with this?

pawciut commented 6 years ago
Mouse.Instance.Location = element.ClickablePoint;
Mouse.Instance.Click();

solves exception on element.Click()

solution by Milev Grigorov https://stackoverflow.com/questions/17305248/how-can-i-configure-teststack-white-timeouts