Highlighted
Absent Member.
Absent Member.
1147 views

Error -205177: Reference Error - Undefined Variable.

Jump to solution

Hello Experts,

I am working on TruClientIE protocol version 12.02. Am capturing visible text from the application screen using "Evaludate JS on Object" funtion. 
Steps to Capture Visible Text

1. Drag out “Evaluate JS on Object” from the Toolbox
2. Click on “ Click on Choose an object” and highlight the object wanted
3. In the “Step” drop down tab of the step, change the Action from “Evaluate JavaScript” to “Get Property
4. In the “Argument” section of the step, In the property box select “Visible Text” and in the Variable box type: “VisibleText”

Now to validate above, I am using  “Evaluate JavaScript”, with code window.alert(VisibleText);

But getting below error message on above validation steps 

Evaluate JavaScript Code window.alert"VisibleText"; failed - exception occured: ReferenceError "VisibleText" undefined 

Why “VisibleText” is undefined? How and where to define it ?

Thanks

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

Re: Error -205177: Reference Error - Undefined Variable.

Jump to solution

Issue resolved -

Version 12.02 and higher has new feature. Both the Arugments  i.e. Property and Variable are made "Plain Value" by default. Now you need to change the Variable Type to JavaScript to make is JS variable.

View solution in original post

4 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Error -205177: Reference Error - Undefined Variable.

Jump to solution

Hi,

You are doing everything right.

Are you sure the element you are trying to capture text from has text in it? Can you change the property from Visible Text to "All Text" or "Inner HTML" and try again?

BTW: not that I think it is relevant, but which patch level and which IE level are you using? It is recommended installing the latest patch with 12.02 when it comes to TruClient IE.

Thanks,

Shlomi 

Highlighted
Absent Member.
Absent Member.

Re: Error -205177: Reference Error - Undefined Variable.

Jump to solution

Thanks Shlomi. I tried the same steps on Version 11.52 and found it working as expected.

I see below difference b/w 11.52 and 12.02

V11.52= Arguments Property are enclosed by double quotes like "Visible Text", "All Text", "Inner HTML" whereas in case of 

V12.02 or higher = Aguments Property are not enclosed by double quotes. They are shown as it is - Visible Text, All Text, Inner HTML.

I tried to put double quotes like "Visible Text", but getting step error stating 'Property': The specified value "Visible Text" is not in the set of valid entities. (["Visible Text","All Text", "Inner HTML"])

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Error -205177: Reference Error - Undefined Variable.

Jump to solution

Issue resolved -

Version 12.02 and higher has new feature. Both the Arugments  i.e. Property and Variable are made "Plain Value" by default. Now you need to change the Variable Type to JavaScript to make is JS variable.

View solution in original post

Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Error -205177: Reference Error - Undefined Variable.

Jump to solution

Glad to see you solved that. Good job.

I completely forgot about it, i am already used to it.

 

 

0 Likes
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.