Hi all!
I'm dealing with SAP. (More precisely I want to get the error or warning message from the status bar.)
Is it normal if the waitControl say we have the control, the waitEnabled say it's enabled, and the getControl fails ?
waitControl --forcerefresh --selector "Id" --id "wnd[0]/sbar/pane[0]" --timeout "00:00:00.2500000" MessageBarFound=value
if --left "${MessageBarFound}" --operator "Is_True"
delay --timeout "00:00:01"
waitEnabled --timeout "00:00:00.2500000" --selector "Id" --id "wnd[0]/sbar/pane[0]" enabled=value
if --left "${enabled}" --operator "Is_True"
getControl --selector "Id" --id "wnd[0]/sbar/pane[0]" --timeout "00:00:01" control=control
logMessage --message "Status bar found ${control.Id} - ${control.InnerText}" --type "Info"
else
logMessage --message "StatusBar DISABLED" --type "Info"
endIf
endIf
Errormessage on getControl:
System.NullReferenceException: Object reference not set to an instance of an object.
at WDG.Automation.Runtime.GetControlResponse..ctor(IControl control)
at WDG.Automation.Windows.GetControlCommand.ExecuteCore(WindowsContext context)
What do I do in the wrong way ?
Plus info : the statusbar is empty at running time.
Thanks in advance!
------------------------------
István Nagy
------------------------------