Forum Discussion
tristaanogre
14 years agoEsteemed Contributor
Short answer: Yes, you can do it.
Long answer: You can interact with your emulator by passing a "Keys" method to the window to effectively test the input since that is what you're doing as a user anyways. You're not going to be able to say "Set input field 2 to value X" since a regular user of a terminal emulator like that can't get to input field 2 without navigating to it using Tab or Enter keystrokes.
As for the output fields, again, you have a similar problem as you do with the input because there aren't necessarily separate components that represent the output fields and an end user at the terminal is simply reading text that is printed out on the screen (albeit printed at particular locations on the terminal screen). Your best bet for testing those things is either using Region checkpoints (http://smartbear.com/support/viewarticle/11028/) or by using Text Recognition (http://smartbear.com/support/viewarticle/11502/) or OCR (http://smartbear.com/support/viewarticle/11241/). Any one of these three features can be used to validate the text output of the terminal.
Long answer: You can interact with your emulator by passing a "Keys" method to the window to effectively test the input since that is what you're doing as a user anyways. You're not going to be able to say "Set input field 2 to value X" since a regular user of a terminal emulator like that can't get to input field 2 without navigating to it using Tab or Enter keystrokes.
As for the output fields, again, you have a similar problem as you do with the input because there aren't necessarily separate components that represent the output fields and an end user at the terminal is simply reading text that is printed out on the screen (albeit printed at particular locations on the terminal screen). Your best bet for testing those things is either using Region checkpoints (http://smartbear.com/support/viewarticle/11028/) or by using Text Recognition (http://smartbear.com/support/viewarticle/11502/) or OCR (http://smartbear.com/support/viewarticle/11241/). Any one of these three features can be used to validate the text output of the terminal.