WPF app - Cannot Handle 'Generic' dialog in condition IF...ELSE

1 Answer 9 Views
Dialog Test Execution WPF Testing
Tien
Top achievements
Rank 1
Tien asked on 27 Mar 2024, 07:03 AM | edited on 27 Mar 2024, 07:03 AM

Hi Team,

I have an issue when putting the action "Handle 'Generic' dialog" in condition IF...ELSE.

When I didn't use condition IF...ELSE, the step Handle 'Generic' dialog is PASSED.

This is the dialog that I want to handle:

And, this is the pass result:

But, when I used the condition IF...ELSE and put the Handle in the ELSE sentence. I got this error

I wonder why the Handle doesn't work in the ELSE sentence?

Please help me look into this problem.

Thanks and Regards,

Tien

1 Answer, 1 is accepted

Sort by
0
Shtilianov
Telerik team
answered on 27 Mar 2024, 12:54 PM

Hi,

That's an interesting case. There shouldn't be any difference. This may sound like a redundant question, but does the generic dialog appear runtime when you enter the else statement?

When a test starts, at the same time the dialog handling will start, so the mechanism waiting for dialogs and handling dialogs is started at the beginning of each test, it shouldn't matter where the handling the dialog is put inside the test. 

I have two suggestions:

1. Put a manual step from the step builder just before the handle dialog step in the Else statement or mark the handle dialog step with a breakpoint for debugging (put a small delay step just before the handle dialog step, then right click on the delay step and click on set breakpoint). Both actions will pause the execution when the test scripts enter the else statement. From that point you can check what the status of the dialog is. Does it appear and what's the title.

2. Put a delay before the handle dialog step. There may be some problem with the dialog initialization and a delay may help.

Regards, Miroslav Shtilianov Progress Telerik

Virtual Classroom is the free self-paced technical training portal that gets you up to speed with Telerik and Kendo UI products including Telerik Test Studio! Check it out at https://learn.telerik.com/.
Tien
Top achievements
Rank 1
commented on 28 Mar 2024, 08:12 AM

Hi,

"Does the generic dialog appear runtime when you enter the else statement?" => Yes, it does. The dialog is appeared but it can't be handled.

I have followed your suggestions but they didn't work.

I added "Manual Step" before the ELSE and inside the ELSE (before the handle dialog). I also added a delay before the handle dialog. Pls see the image below.

Here is the log debug:

Please help me to check it.

Thanks and Regards,
Tien

 

Elena
Telerik team
commented on 28 Mar 2024, 01:13 PM

Hi Tien, 

I see that you are licensed user of Test Studio product so I will recommend you to submit a private support thread where we can continue the discussion in further details. 

It will be essential for us to understand more about the specific scenario you are automating and the possible workflows. Also, it will be best of you can share the test files with us - that way we can identify what might be going wrong with the test setup.

And since this is a public item you might find it insecure to share the in depth details here. Therefore, use your Telerik account to submit a support ticket which remains private for you only. You can refer the current forum post thread when submitting the private ticket so that we have the initial information in hands.

Thank you for your understanding and cooperation in advance. 

Regards,
Elena

Tags
Dialog Test Execution WPF Testing
Asked by
Tien
Top achievements
Rank 1
Answers by
Shtilianov
Telerik team
Share this question
or