riordanalex
11 years agoOccasional Contributor
"Object does not support this property or method" JScript bug?
Using TestComplete 9.31 on a 32-bit Windows 7 machine.
The code:
Line 1: var toolbar = Aliases.epic.frmDesktop.NavTile.epicToolbar;
Line 2: toolbar.wButtonText(1, true);
the variable toolbar is of type WinToolbar32, and it shows up properly in the Object Browser mapped correctly.
Line 2 is generating a JScript runtime error: "Object does not support this property or method"
Now, in real life, one would assign the result of a call to wButtonText to a variable, but should it really be generating a runtime error if we decide not to assign it to anything (was just playing around with some of the methods at this point)? Expected behavior would be for NOTHING to happen. This seems like a bug to me.
The code:
Line 1: var toolbar = Aliases.epic.frmDesktop.NavTile.epicToolbar;
Line 2: toolbar.wButtonText(1, true);
the variable toolbar is of type WinToolbar32, and it shows up properly in the Object Browser mapped correctly.
Line 2 is generating a JScript runtime error: "Object does not support this property or method"
Now, in real life, one would assign the result of a call to wButtonText to a variable, but should it really be generating a runtime error if we decide not to assign it to anything (was just playing around with some of the methods at this point)? Expected behavior would be for NOTHING to happen. This seems like a bug to me.