Hi Rob-
Unfortunately, if the window is in a Citrix terminal, the options are pretty limited. Phantom can only see information about a window if it is on the Desktop directly. I am not aware of an application that would be able to read inside the Citrix terminal (although one may exist). However, I do have a couple of questions:
1: Are you able to select text in the form and manually copy it and paste it? If so, Phantom can 'read' the text by reading it from the Clipboard (using a TypeKeys to either select Copy from the Edit menu or to simulate CTRL+C, and then use GetClipboardText). You can then paste it (either by using TypeKeys so select the menu or to simulate 'SHIFT+INS' or 'CTRL+V').
- Code: Select all
# Click at x,y, where the control is
# Alternatively, you could probably use 'TypeKeys("<TAB>")' to tab to the control
MyApp.MouseClick(0, x, y, 0);
# Simulate a copy
MyApp.TypeKeys("<CTRL-C>");
# Get the text from the clipboard
string s = GetClipboardText();
2: Likewise, are you able to manually copy and paste from the drop-down list after the name is entered? If so, you can use TypeKeys to navigate the list, then copy the contents, and check it against the 'desired' value.
- Code: Select all
# Click at x,y, where the control is
# Alternatively, you could probably use 'TypeKeys("<TAB>")' to tab to the control
MyApp.MouseClick(0, x, y, 0);
# Navigate the list (this would be in a loop)
MyApp.TypeKeys("<DOWN>");
# Simulate a copy
MyApp.TypeKeys("<CTRL+C>");
# Get the text from the clipboard
string s = GetClipboardText();
if(s == desired){
# Do something
}
It unfortunately is much more difficult (using Phantom, anyway) to automate if WinDR cant get the window information. The only option is to use TypeKeys and MouseClick, and by 'copying' and 'pasting' using the clipboard functions. However, usually it can be done with Phantom if copying and pasting can be done. Sorry I dont have advice for any other applications, but I dont know of any that can 'read' information inside a Citrix terminal without copying and pasting.
I hope this helps. If it turns out you can do 'copy and paste', it may indeed be possible. I have automated some pretty complex processes interacting with different terminals by using only TypeKeys, MouseClick, and clipboard functions. If you have any questions, please let me know!
-John