Hello,
While scripting an application with TruClient (11.52) using firefox I am running into the following problem:
I want to filter out a piece of text on a webpage and store it into a variable.
The source of the page looks like this:
<h1 id="pageTitle" class="status1">
Case PL2500-140414-113801431 -
Some comment here
</h1>
I want to filter out the text of the h1 element. I thought the way to do this would be to add an evaluate javascript step and add the following code to the arguments section:
var Casenr = evalXPath("//h1[@id='pageTitle']/text()");
window.alert(Casenr);
But when I run this step it gives me the following error: ReferenceError: evalXPath is not defined.
Does this mean I am only allowed to use evalXPath in the object section of a step and not in the arguments section?
How should I do this then?
Maybe it's simple, but I don't see it.
Peet