Forum Discussion
You seem to be referencing the Desktop and not your Application Under Test.
Here's example code in accessing Notepad, which is already opened and visible in the Object Browser of TC.
function Example()
{
var notepad = Sys.Process("notepad");
var wndNotepad = notepad.Window("Notepad");
// Open a file in Notepad
wndNotepad.MainMenu.Click("File|Open...");
}
- arijken1 hour agoOccasional Contributor
I know how to open the menu item. When I click on the menu item a window opens.
The window contains a grid. In that window I need to click toolbar buttons which opens a window for editing values
I got 3 buttons I want to test
bNew -> Opens a input form and I Like to add some data en and click the OK button on the form which saves the inputbEdit -> Opens the same window with data. I want to modify some data and click the OK button on the form
bDelete -> Delete the selected row in the grid
I don't get input window when running my script
Close the window with the grid and go the the next menu item.
- rraghvani1 hour ago
Champion Level 3
You need to access your Application Under Test rather than the Desktop (unless your test specifically involves the Desktop).
I have provided sample code showing how to access the application under test using Notepad as an example, since I don’t know the name of your actual application.