Highlighted
Established Member.
410 views

How to convert Ajax Tru client's feature of 'Get Visible Text' to javascript code in Web protocol

Problem: Part of my trading application's logic is done on client side through javascript. Therefore conventional correlation is impossible, and we need to capture the streaming trade/rates value that is dynamic and visible on the UI  only for a limited period of time.

Dependency: Application operates on Web protocol with Web Socket support (for rate streaming). Therefore scripting the entire application to run in javascript, or using web_js_run will furthur add overhead to the script.

Alternative: Tried scripting application using Ajax Tru client, which solved above issues. But this cannot be relied upon for load testing due to scalability issues and also with huge difference in response times for Truclient vs Web protocol.

My Question: I have used the 'Get Visible Text' feature in Ajax Tru client that captures the visible text and saves into a variable. Using Evaluate Javascript logic like evalXPath("//div[@id=\"leftccyrate\"]");

How can I replicate the same logic in a simple way in Web protocol to capture the visible text ? I have looked into the advised web_js_run function which runs a .js script, but my client logic is not straighforward and uses multiple internal javascript calls in order to capture the final buy/sell rate value

Has anyone faced a problem like this ? This is my first post and I am expecting some suggestions from our Perf enthusiasts.

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.