For windows or windows form, you need to use another framework like Uiautomationclient,
see examples below.
var processoId = Process.GetProcessesByName(Nome do processo).First().Id;
AutomationElement rootElement = AutomationElement.RootElement.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.ProcessIdProperty, processId));
var botaoSalva = rootElement.FindFirst(TreeScope.Descendants, new PropertyCondition(AutomationElement.ClassNameProperty, "Nome da propriedade do botão salva"));
object obj;
if (botaoSalva.TryGetCurrentPattern(InvokePattern.Pattern, out obj))
{
InvokePattern invoker = obj as InvokePattern;
invoker.Invoke();
}
There are tools like Inspect and the Uiaverify which allows you to see the properties of each field of the dialog to get the name of the properties.
The print preview screen is outside the limits of Selenium, so only with it I believe it will not be possible, an alternative is to combine the use with some tool like Sikuli or Autoit that are not limited to the browser only.
– Lucas Miranda
Thank you @Lucasmiranda!
– Vinícius Avansini