Absent Member.. Absent Member..
Absent Member..

Why DP code gets error but OR code works fine?



I am struggling with why a dialog named "Input" can be closed using OR, but doesn't work when converting it to DP.


OR:  (all on same line)

Window("Nextech (usa63db)").Dialog("Note / Follow-Up Categories").Dialog("Input").WinButton("Cancel").Click


DP: (all on same line, which is line 600, see below)

Window("Nextech (usa63db)").Dialog("regexpwndtitle:=Note / Follow-Up Categories").Dialog("text:=Input").WinButton("text:=&Cancel").Click


The Run Error is:


Object doesn't support this property or method: 'Window(...).Dialog(...).Dialog'


Line (600): "Window("Nextech (usa63db)").Dialog("regexpwndtitle:=Note / Follow-Up Categories").Dialog("text:=Input").WinButton("text:=&Cancel").Click".


Still pretty new to UFT and DP, so it's probably something silly that I'm not recognizing.


Version of UFT is 12.02




1 Reply
Absent Member.
Absent Member.

Hi Bret,


While we are giving property value (For exp : regexpwndtitle:=Note / Follow-Up Categories) in the script, We have to include "\" before the special characters to make it as meaning literaly.


Please try - "regexpwndtitle:=Note \/ Follow-Up Categories" or "regexpwndtitle:=Note.*Follow-Up Categories"

(I guess we have to include "\" before the "&" symbol too)


Before performing the action on the object, just highlight the object and make sure that the particular object is highlighted.



Sharmila Jeevamani

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.