While working with Test Advantage and Net Advantage (Infragistics) for WPF
controls in QTP/UFT ,we some time get error message "Object reference not
set to an instance of obejct"while running the script.
This error message basically thrown by QTP/UFT when "Click" and "Set" operation
performed on "WpfButton" and "WpfEdit" objects respectively . This is because operations
are performed over them are not compatible wtih QTP/UFT tool.
How to overcome this issue ?
We can to use 'type' operation over WpfButton and WpfEdit objects. For click operation
we need to pass "{micAppKey }" and for "Set" operation we need to pass just text .
Demonstration has been done below :
WpfWindow("WpfWindow_AppMainScreen").WpfButton("WpfButton_Submit").Click
WpfWindow("WpfWindow_MainScreen").WpfButton("WpfButton_Submit").type "{micAppKey }"
WpfWindow("WpfWindow_AppMainScreen").WpfEdit("WpfEdit_Name").Set "Mike"
WpfWindow("WpfWindow_AppMainScreen").WpfEdit("WpfEdit_Name").type "Mike"
controls in QTP/UFT ,we some time get error message "Object reference not
set to an instance of obejct"while running the script.
This error message basically thrown by QTP/UFT when "Click" and "Set" operation
performed on "WpfButton" and "WpfEdit" objects respectively . This is because operations
are performed over them are not compatible wtih QTP/UFT tool.
How to overcome this issue ?
We can to use 'type' operation over WpfButton and WpfEdit objects. For click operation
we need to pass "{micAppKey }" and for "Set" operation we need to pass just text .
Demonstration has been done below :
WpfWindow("WpfWindow_AppMainScreen").WpfButton("WpfButton_Submit").Click
WpfWindow("WpfWindow_MainScreen").WpfButton("WpfButton_Submit").type "{micAppKey }"
WpfWindow("WpfWindow_AppMainScreen").WpfEdit("WpfEdit_Name").Set "Mike"
WpfWindow("WpfWindow_AppMainScreen").WpfEdit("WpfEdit_Name").type "Mike"
0 comments: