We use Silverlight and so we can't access the windows
printer dialog which opens, to select an PDF printer.
Do you have any suggestions?
Regards
Gina
1 Answer, 1 is accepted
0
Plamen Mitrev
Telerik team
answered on 09 Jul 2020, 11:40 AM
Hello Gina,
The Windows Printer Dialog is actually a Windows dialog and not part of the application under test. As a result, Test Studio does not "see" it and can't record actions against this dialog. You can still automate this test scenario, by following the steps below.
You need to configure this window to have the expected selections and options outside of the test automation, as a precondition. Set the default printer and other settings that you want and apply them. Those should be saved on your machine and the next time this dialog is opened, they should be already set.
Add a coded step after the delay and configure it to press the Enter key from the Keyboard Manager. You need to add a reference to System.Windows.Forms to your project and coded step. See the sample code below.
If you need to handle another dialog, which saves the PDF file to a specified location, you might need to add another execution delay and then press Enter key again in a coded step.
I remain available to advise you further and explore the behavior after the suggested steps.
Regards,
Plamen Mitrev
Progress Telerik
Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic. Our thoughts here at Progress are with those affected by the outbreak.