In a WPF test, how do I wait for a button that is disabled due to an async save in progress to complete and become enabled before continuing the next step in the test?
Thanks,
Richard
2 Answers, 1 is accepted
Again - don't know if this helps, but you may need to write a coded step using the Actions -> Javascript Events.
SSq
Hi SSq,
Thank you for jumping in to the conversation - I appreciate it!
Just wanted to add that the JavaScript events are only used in web applications and will not suit the needs in WPF testing.
Regards,
Elena
Hi Richard,
The wait and verification steps are also available in WPF test recording and are personalized based on the highlighted element. You can also explore the Advanced verification options in the advanced Recording tools window.
Let me know if you have explored these already and don't find what you are looking for.
Regards,
Elena
Progress Telerik
Hi Elena,
I have read over the docs and I have been able to get TS to wait for a button to become enabled. This is great, thank you.
However, I'm not sure if this is a bug or a feature request (or if I'm missing something). I can't add the wait Enabled step after the test is recorded. I can only add it while recording a test.
For context, the WPF Control I'm examining is a Tekerik RadButton, and Test Studio is correctly identifying that it is a RadButton.
I'd love it if this Enabled verification option was available in the post-recording editor as with an application that makes a lot of async calls and disables parts of the UI while those calls complete this step will be used hundreds and hundreds of times in our tests. I realise I can run the test and pause it where I need to inject the wait, but again, doing this hundreds of times will make creating these tests very difficult and slow.
Here are the verification options while recording a step
Here are the possible verification options during post-recording test editing
The online help docs seem to indicate that in the past the Enabled check was there
Thanks,
Richard
Hi Richard,
Thanks for taking the time to work on the suggested approach for using the wait and verify steps.
As to your finding about the missing option for Verification if Enabled for an existing element in the Step Builder - I agree that this is a miss from our end. Thus I submitted a bug report on your behalf into our public feedback portal. You can see the public item here and also under your Telerik account.
Until we include this item in our roadmap you will only be able to use the partial test run options and add the step as you record. One more option is to reuse an already recorded step of the same type and only change its target element.
I hope this information will be of further help for you. Let me know in case you have any other questions.
And thank you for your cooperation once again.
Regards,
Elena
Thanks Elena.
Duplicating the wait step is a good tip, I'll be using that.
Cheers,
Richard
I'm pleased to hear the suggested approach will be of further help for you. Thank you for your time in our conversation!
Regards,
Elena