New Member.

VuGen Scripting: Validate against response page title

Hi there.

I wish to perform a validation against the page title of the response page. Which function do I use?

(2 possible pages-versions may be returned based on the submitted value. Both possibilities may contain my text-to-be-found anywhere in the page, however only one of them - the condidtion I wish to validate - will have the text in the title for sure. I must find the specific title.)

From what I understand

- Web_reg_find will search anywhere on the page:

   > So the text expected in my response-page title, may also occur elsewhere in the alternative page

   > Including the <title> open an closing tags along with the title value as part of my searched-text, leads to a script error

- web_reg_save_param_attrib: (Does what exactly?)

  > I don't get this. I'm not really familiar with web elements, etc.

  > My 1st attempt excluded the "Extract"-arugment. What should I provide there? How is it different from the "TagName"-argument? Which argument do I use to indicate I wish to search the title-field? ... and in which argment do I provide the title-value?

- web_reg_save_param_ex: Finds any value between 2 set text-boundaries

  > That won't verify an explicit value I'm looking for

- web_reg_save_param_regexp: Not sure if this will search all html (tags and values, etc)

  > This seems extreme. There must be simpler way to just verify a specific tag's value

1 Reply
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: VuGen Scripting: Validate against response page title

A web_reg_save_param_ex with the boundaries <title> and </title> should work. Also check the help on Search Filters. You can limit the search to header section and even specific header fields.

If you only want to validate and not save the content in a parameter, you can use web_reg_find with attribute "Search=Header". See Attributes in the help of web_reg_find.

When you get an error share your line of code and the error message.

Reward community members who take time to respond and help.
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.