I am opening an application with RPA.Desktop and then I use the Press Keys keyword to send Ctrl+N to the application. This is run from vscode. The application opens but the key is send to vscode as that is still the active window and therefore opens a new file in vscode. Am I doing something wrong here?
Note that I am running on Windows and the application that I am opening is Notepad++.
I am actually using RPA.Desktop which does not have the Switch to Application command I believe. I am using RPA.Desktop library as the actual target application is a Java application. I just used Notepad++ for testing the concept. Is there a similar command for switching in RPA.Desktop? I could not find any.
${Notepad} Open Executable C:\\Program Files\\Notepad++\\notepad++.exe new 1 - Notepad++
Switch to Application ${Notepad}
RPA.Desktop.Press Keys ctrl n
I also tried clicking certain elements in Notepad++ but it seems like the locators do not resolve. Inspecting it with Accessibility Insights for Windows revealed that none of the elements had an AutomationId. Tried to select on name but that did not work either and I am not sure what locator types you can use.
I could not open Notepad++ with Open Application. I am assuming this is because it is not a native Windows application but I am not entirely sure.