16 Answers, 1 is accepted
Please provide further details on this case:
- Which version of the Chrome and Telerik browser extensions do you work with?
- Provide a scrrenshot of the handle step options, please.
I attached a possible options configuration on the handle alert dialog step that works fine with Chrome on our side. Try to implement them to check if it works in your case as well.
Best Regards,
Nikolay Petrov
Telerik by Progress
I did a new install of chrome yesterday it is Version 58.0.3029.110 (64-bit)
test studio is version 2017.1.207.0
and I attached the handle step options
I re downloaded the extensions this morning but they are
Telerik test studio chrome explore 2014.1.410.2
Telerik test studio chrome playback 2016.3.1027.1
Telerik test studio chrome recorder 2014.2.618.5
Thank you for the additional information provided.
The problem here seems to be in very old Chrome Recording extension. If update to the latest internal build version (2017.1.328) as pointed out on the attached screenshot it should update the extensions as well.
I hope this would solve the problem.
Kind Regards,
Nikolay Petrov
Telerik by Progress
We have a new product release available. It should update the Chrome extensions automatically. Try to update or install fresh and let us know if this solves the problem, please.
Best Regards,
Nikolay Petrov
Progress Telerik
Please make sure that you use latest product release 2017.2.530 with the latest extensions available for Chrome. See the attached screenshot.
Kind Regards,
Nikolay Petrov
Progress Telerik
I need coded step for handling alert box.
Following code doesn't work for me-
AlertDialog altDlg = new AlertDialog(ActiveBrowser,DialogButton.OK);
Manager.DialogMonitor.AddDialog(altDlg);
I need code only, as its a lot of if-else condition there, so In build dialog handler will now work.
The dialog from the screenshot looks like a Confirm dialog and probably this is the reason for the failures you encountered when using Alert dialog handler. This said, can you try the following code as it should be the same as yours, but using a Confirm dialog:
// Add a confirm dialog to monitor
ConfirmDialog altDlg =
new
ConfirmDialog(ActiveBrowser , DialogButton.OK);
Manager.DialogMonitor.AddDialog(altDlg);
// Given that there were not dialog attribute set, the manager will not start the monitoring.
// You need to invoke the monitoring
Manager.DialogMonitor.Start();
// Then invoke the action that triggers the dialog
Additionally, please note that, you need to explicitly start the dialogMonitor and trigger the dialog appearance after the dialog is added. In other words - the consequence of the actions in the code above need to be explicitly followed.
I hope this works for you. In case you need further assistance, please let me know.
Regards,
Elena Tsvetkova
Progress Telerik
With this code I am facing issue:
1. The type or namespace name 'ConfirmDialog' could not be found (are you missing a using directive or an assembly reference?)
2. The name 'DialogButton' does not exist in the current context
Can you please double check if you have included the following using statement at the beginning of the coded step:
using
ArtOfTest.WebAii.Win32.Dialogs;
If not, please add this and then compile the project again. Will this work this time?
In the case you still face any troubles, please prepare a sample test with this code, which reproduces the issue and send it zipped via this thread. Thanks in advance.
Regards,
Elena Tsvetkova
Progress Telerik
Elena -
I bumped into this issue when I had a fairly complicated bit of code (looking through table cells for one particular link) where my code clicked on something that gave me a confirmation dialog. The fact that I could right click on a 'Handle Dialog' step and the "Edit in Code" option was just greyed out and not available seemed non-optimal.
Thinking more about it, I think it would be better to have the 'Edit in Code' option lay down two methods, a setup method and a handle method. The step would have to be split as well.
You could add a comment, in the setup method,which explains that this step would have to be moved so that the step occurs before the step that causes the dialog to appear.
Alternatively, you could add only a handle method and add commented code for the setup method and explain that the commented code needs to be put somewhere to execute at the right time.
At the very least, add the handler method and include a link to documentation which describes the setup method.
Almost anything, except leaving the "Edit in Code" option silently unavailable, would be better.
Hello Ray,
I really appreciate your valuable feedback. I completely agree that we can improve this part of the available options and your idea will be shared with the engineering team. As this doesn't seem to be a difficult task to accomplish, I hope it will be available really soon within Test Studio.
Thanks once again for your cooperation.
Regards,
Elena
Progress Telerik