Highlighted
Outstanding Contributor.
Outstanding Contributor.
230 views

TruClient Web, Possible JavaScript issue only in Chromium? ...

LR 12.53, TruClient Web.

This script works fine in IE and FF. But when I run it it Chrome, I get the occassional error below. By occassional, I mean in the last test for example it worked about 220 times, and failed with the error below 9 times.

It's not related to the load injector, I see it happening on all of them at various times.

ERROR Message in CONTROLLER:
t=00800352ms: Error -205177: ** 38.3: Type [object Object] in Member ID textbox ** failed - an argument is invalid:
'Value': JavaScript exception '[object Object]' during evaluation [MsgId: MERR-205177]

The item, 38.3, is typing a string from a variable into a text box. The string is grabbed from a VTS table that works reliably. Again, it works most of the time in Chromium, and perfectly in IE and FF.

Here's a screenshot of the actual step.

38.3.png

Any ideas?

Thanks,
Chris

0 Likes
7 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: TruClient Web, Possible JavaScript issue only in Chromium? ...

Hi,

Probably an issue to fetch the data from VTS. TruClient integration with VTS uses browser's API, the browser's implementation is different and that may explain the issue. Unclear.

Can you add a step to validate whether szSubscID is valid before typing it and if it isn't try to fetch it again?

Regards,

Shlomi

Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: TruClient Web, Possible JavaScript issue only in Chromium? ...

Sure, I'll give that a shot, thanks.

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: TruClient Web, Possible JavaScript issue only in Chromium? ...

Hmmm. No luck yet.

So I added code like this, right before the problem spot:

// sometimes when using Chromium, the szSubscID value is not properly retrieved from the VTS,
// so we'll check if it's blank, and attempt to retrieve again if necessary
if(szSubscID == "")
{
   szSubscID = TC.vtcGetCell();
}

And now I'm seeing this:
t=00093663ms: Error -205177: ** 38.2: Evaluate JavaScript code //window.alert(szSubscID...egistered"); } ** failed - exception occurred: ReferenceError: szSubscID is not defined [MsgId: MERR-205177]

Is it almost like szSubscID somehow went out of scope?

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: TruClient Web, Possible JavaScript issue only in Chromium? ...

Hi,

Can you please try this code instead

if(szSubscID == undefined || szSubscID == null) {
        szSubscID= TC.vtcGetCell("MyColumn",1,"MyVts");
 }

Regards,

Shlomi

Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: TruClient Web, Possible JavaScript issue only in Chromium? ...

Sure, let me give that a shot.

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: TruClient Web, Possible JavaScript issue only in Chromium? ...

Darn. No luck, still seeing the problem occassionally.

Definitely a weird one.

I placed your code immediately right before my use of the variable.

Step 38.3 now looks like:
if(szSubscID == undefined || szSubscID == null) {
szSubscID = TC.vtcGetCell("MyColumn",1,"MyVts");
}

And the error has now moved to that step:
t=00270679ms: Error -205177: ** 38.3: Evaluate JavaScript code //window.alert(szSubscID...egistered"); } ** failed - exception occurred: ReferenceError: szSubscID is not defined [MsgId: MERR-205177]

 

 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: TruClient Web, Possible JavaScript issue only in Chromium? ...

Hi,

1. Please send me a private message. I would like to give you my email so you can send me your script.

2. Please open a support ticket as well while this thread is going on.

Thanks,

Shlomi

 

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.