Welcome to Magazine Premium

You can change this text in the options panel in the admin

There are tons of ways to configure Magazine Premium... The possibilities are endless!

Member Login
Lost your password?

AJAX TruClient Protocol – Tips and tricks

Post publishing my articles the high level review on AJAX TruClient protocol of LR and incorporating basic functionalities in AJAXTruClient, I am receiving a number of messages, comments and queries via email and on LinkedIn. Most of the queries are related to implementations of basic functions in the scripts developed on TruClient. Through this article, I would resolve some of those very common queries and thus try to save a lot of time that you performance testers may have to invest.

 

Displaying the value in a parameter or variable

While replaying the script, if you wish to understand the value that gets stored in a parameter, you can use alert() function. This function can be used as shown below.

var abc=”Hello World”;

window.alert(abc);

The above code will give us get following output –

Disable pop-ups during recording

Unwanted pop-ups during script development create hurdles. If you want to disable the pop-ups, you can do it by following the below mentioned steps –

  1. In the firefox address bar, enter ‘about:config’. Click ‘I’ll be careful, I promise’ tab.
  2. In the filter field, enter disable_open_during_load.
  3. Right click on ‘disable_ open_during_load’ and select ‘Toggle’. The value changes to ‘false’.
  4. Record initial Navigation step again.

Your pop-ups will be disabled.

Another issue with pop-ups -

While recording business process with pop-ups, mozilla tries to block the pop-ups and displays a pop-up blocker bar with a message ‘Firefox prevented this site from opening a pop-up window’ and presents you with its three options of pop-up management. If out of those three, you select – ‘Don’t show this message when pop-ups are blocked’, then pop-up blocker bar will not be displayed upon replay and you may not be able to edit pop-up blocker options.

If in such a scenario, you wish edit pop-up blocker options, you won’t have to re-record the script. Just follow these steps -

1) Open the script directory
2) Go to profiles\interactive folder
3) Edit the file ‘perfs.js’
4) Search for the line – user_pref(“privacy.popups.showBrowserMessage”, false);
5) Change the value to true – user_pref(“privacy.popups.showBrowserMessage”, true);

The pop-up blocker bar will be displayed the next time you replay the script.

Turning on Run-time viewer in load mode -

By default, replay snapshots don’t appear during script replay in load mode. In order to turn on the run time viewer, follow these steps -

1) Open the script directory
2) Edit ‘default.cfg’ file
3) Add this line to the file – PaintWindowsInLoad=1
4) Save the file

Replay snapshots would be enabled by making this change.

Share

Tags: ,

14 Responses to AJAX TruClient Protocol – Tips and tricks

  1. [...] may also want to read – AJAX TruClient Protocol – Tips and tricks Part I AJAX TruClient – The next Revolution in Performance Testing domain AJAX TruClient – [...]

  2. Ali on October 18, 2012 at 10:18 am

    Hi,

    The comment above about Disable pop-ups during recording is not correct!

    I was having an issue where Mozilla Firefox windows were popup was being blocked under load mode but not interactive mode.

    To fix it I had to type about:config in the Firefox window that opens when interactive mode is activated by clicking “Develop Script” under Ajax Truclient protocol.

    Once there I had to set disable_ open_during_load’ to false and this ENABLED pop-up not disable it as this post seems to suggest.

    Right click on ‘disable_ open_during_load’ and select ‘Toggle’. The value changes to ‘false’.
    Record initial Navigation step again.

    Your pop-ups will be disabled.

    This forum comes up at the top of Google when searching and as such I deemed it prudent to let others know to save them the time I lost :)

    Best,

    Ali

    • swaraj on October 18, 2012 at 6:23 pm

      Ali,

      I had tried & tested it while writing this post. Today I tried it again, pop up gets blocked w/o any issue by the steps I have mentioned. Please re-check.

      Appreciate your pro-activeness.

      Regards,
      Swaraj

      • Ali on November 10, 2012 at 8:08 pm

        Hi again,

        I am not sure maybe I am miss understanding…

        You state:

        Disable pop-ups during recording –

        Unwanted pop-ups during script development create hurdles. If you want to disable the pop-ups, you can do it by following the below mentioned steps –

        In the firefox address bar, enter ‘about:config’. Click ‘I’ll be careful, I promise’ tab.
        In the filter field, enter disable_open_during_load.
        Right click on ‘disable_ open_during_load’ and select ‘Toggle’. The value changes to ‘false’.
        Record initial Navigation step again.

        Your pop-ups will be disabled.

        If ‘disable_ open_during_load’ is set to ‘false’ the pop-ups are ENABLED not disabled.

        Am I getting this wrong somehow?

        If you want pop-ups disabled then you want to set the flag to true which is the default value.

        Best,
        Ali

  3. amy on November 7, 2012 at 4:38 pm

    i’m having issues where the ajax true client script will not execute properly during a test, and get the following error: t=00069863ms: Error -203256: ** 17: ** failed – target object was not found. [MsgId: MERR-203256]

    do you have any encounter with trying to execute scripts via the controller with this protocol?

  4. Manu on November 8, 2012 at 5:17 am

    Hi,
    I have an issue with Ajax TruClinet.
    In my application,click on a button(say login) is taking lots of time. When i record it , the script has recorded it as “Click Login”& then goes to another page.
    Now i want to record how much time it has taken between the login and page refresh.
    What should be between the lr_start_transaction & lr_end_transaction. Apart from “Login Click”.

  5. Sairam on January 2, 2013 at 3:40 pm

    Hi frnds,
    Am trying to record a script using Ajax TruClient (both Mozilla firefox, IE). But when I clicked on “Develop Script”, an error popup stating “Communication between VuGen and the TruClient browser could not be established. This error occured because you do not have proper permissions”. Please help me out of this problem.

    OS- Windows7
    Mozilla firefox version – 17.0.1
    LR version – 11.5
    Please send ur solutions to my mail ID- [email protected]

    Thanks in advance.

    Regards,
    Sairam.

    • sachin on January 29, 2013 at 4:19 am

      Please Turn of the UAC and check. Turning off UAC Should help resolve the issue. UAC is User Accounts Control

  6. Sumit on January 30, 2013 at 6:31 am

    Run VuGen as a administrator. Right click on VuGen icon-> Run as administrator.

  7. Sree on February 18, 2013 at 1:57 pm

    LR 11.5 Truclient for Firefox supports only for FF 8 version . So better install FF8 and try it.

  8. Diego Caicedo Lescano on July 19, 2013 at 4:41 pm

    You need to set network permissions.
    run the following command in a command prompt

    netsh http add urlacl url= user=

    Hope this help you

  9. Raj on October 10, 2013 at 7:29 pm

    Hey Guys, Quick question…
    in my application, there is a business process that throws a warning popup (like the alert you shown above.). But the issue is the alert is not shown always.. for some conditions it will show and for some it will not. the script currently fails for transactions where alert dialog is NOT shown. How to put a condition around this to NOT to fail if the dialog is not shown?

    Thanks Raj

  10. pranay on May 2, 2014 at 11:07 am

    Facing issue with popups blocker-
    How to handle the pop up in load mode? it is a necessary login popup prompting userid and password, during replay if we enable screenshot it shows pop up blocker window and script failed.

  11. lorena on June 13, 2014 at 11:14 am

    Hello, I set the disable_open_during_load value to false and after I can’t open firefox (I’ve tried to set true value) but now, nothing works! help!!
    Thaks




Leave a Reply

Your email address will not be published. Required fields are marked *

*