Like us on Facebook

February 21, 2015

How to work with Test Advantage for WPF Controls ?

  2/21/2015 No comments

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"

Author: Vikas Pandey

He is a software and web developer working for renowned European investment bank.He loves to share knowledge through blogging whatever he knows and encourages others as well to share the same to make world a better place to live.

0 comments:

.
© 2014-2015 Informational Digit : How-To & Tech Guides. The content is copyrighted to Vikas Pandey and may not be reproduced on other websites. WP themonic converted by Bloggertheme9.
TOP