I am scripting a VUser LoadRunner script and want to save a parameter that is between to boundries in this html:
<span id="ident" class="control-label">
My parameter
<span>
But the problem is that LR fails using this code:
web_reg_save_param(“Some_Txt”, “LB=ident” class=”control-label”>”, “RB=”,LAST );
With the errors:
Action.c (34): syntax error; found class' expecting)’
Action.c (34): syntax error; found class' expecting;’
Action.c (34): undeclared identifier `class’
Action.c (34): syntax error; found RB' expecting;’
Action.c (34): undeclared identifier `RB’
Action.c (34): illegal expression
Action.c (34): missing “
Action.c (34): undeclared identifier `sp’
Action.c (34): syntax error; found “,LAST ); ” expecting `;’
Action.c (36): syntax error; found web_submit_data' expecting;’
Action.c (37): missing
I am not sure about the error msgs. What is the clue here? Is the problem spaces or “” or something else?
Cheers
Magnus
Incorrect syntax on your web_reg_Save para(). Please refer to your foundation skills in C programming on how to escape quotes inside of a string. Assuming that the capture section you have presented is correct across multiple lines of HTML then you will find that you are likely missing additional characters in the left boundary condition. You will also need a better descriptor in the right boundary condition other than a NULL condition.
This answer does not include a solution, but a path to a solution:
Research:
Research: Distinct Right boundary condition (not null), which may include control characters
Researching the above should lead to a stronger understanding of the solution you choose to implement.