Error while executing UFT script using WPF addin

Hi,

i am seeing the below error while executing scripts with Wpf addin. The error is from the application itself but when i try to do it manually i am not getting any error.

Facing this issue only when i am executing UFTscript.

Message : Value cannot be null
Source: Mercury.QTP.WpfAgent
Data:System.Collections.ListDictionaryInternal
TargetSite:Void.ctor(System.Windows.DependencyObject etc

cacnot share any scrrenshot due to my project confidentiality.

Please help.

Thank you

Parents
  • Hi,

    I assume that you are getting the error when replaying a specific statement, based on the error message probably when trying to select an item from a WPFList object. It seems that the item cannot be found or is null. To workaround the problem, could you please try below approaches?

    1. The Select method takes either the item value surrounded by quotes or the item numeric index without quotes. Could you please try using the item numeric index to be selected? For example: 

    WpfWindow("SimpleStyles").WpfList("Main Courses").Select 2

    2. Could you please try using a native method of the WPFList object to perform the selection? This can be done through the use of .Object method. For example:

    WpfWindow("SimpleStyles").WpfList("Main Courses").Object.mySelect 2

    Kind Regards,

    Francisca

Reply
  • Hi,

    I assume that you are getting the error when replaying a specific statement, based on the error message probably when trying to select an item from a WPFList object. It seems that the item cannot be found or is null. To workaround the problem, could you please try below approaches?

    1. The Select method takes either the item value surrounded by quotes or the item numeric index without quotes. Could you please try using the item numeric index to be selected? For example: 

    WpfWindow("SimpleStyles").WpfList("Main Courses").Select 2

    2. Could you please try using a native method of the WPFList object to perform the selection? This can be done through the use of .Object method. For example:

    WpfWindow("SimpleStyles").WpfList("Main Courses").Object.mySelect 2

    Kind Regards,

    Francisca

Children
No Data