Forum Discussion
function timeTest()
{
var javaw;
var sessionWorkspace;
var internalSessionFrameProxy;
var stationTreeTable;
var timeBeforeClick;
var timeAfterClick;
var timeDifference;
var totalTime = 0;
javaw = Aliases.javaw;
for(var i = 0; i < 3; i++)
{
sessionWorkspace = javaw.frame02.RootPane.null_layeredPane.null_contentPane.C3C.SessionWorkspace;
//Time before the action
timeBeforeClick = aqDateTime.Time();
// The Action
sessionWorkspace.InternalSessionFrameProxy3.RootPane.null_layeredPane.null_contentPane.StationBrowserPanel.TreeExplorer.SplitPane.Panel1.StationTablePanel.Panel.ScrollPane.Viewport.StationTablePanel_StationTable.DblClickCell(0, "Description");
internalSessionFrameProxy = sessionWorkspace.InternalSessionFrameProxy5;
// Create object and wait for response.
stationTreeTable = internalSessionFrameProxy.RootPane.null_layeredPane.null_contentPane.NavigableStationEditorController.Panel.Panel.DMS100StationEditorPanel.SplitPane.Panel.DnDTabbedPane.Panel.SplitPane.Panel.ScrollPane.Viewport.StationTreeTable;
//Check time after response
timeAfterClick = aqDateTime.Time();
timeDifference = timeAfterClick - timeBeforeClick;
stationTreeTable.ClickCell(1, "Value");
stationTreeTable.TextField.Keys("time " + i);
internalSessionFrameProxy.WindowsInternalFrameTitlePane.BasicInternalFrameTitlePane_NoFocusButton.ClickButton();
javaw.dialog01.RootPane.null_layeredPane.null_contentPane.OptionPane.OptionPane_buttonArea.OptionPane_button.ClickButton();
Log.Message(timeDifference);
totalTime = totalTime + timeDifference;
}
var averageTime = totalTime/i;
Log.Message("The average run time out of " + i + " runs is " + averageTime);
}
Hope that helps!!
Related Content
- 2 years ago
Recent Discussions
- 4 hours ago