Jump to content
WAPT Forum
Sign in to follow this  
avin_mehya

Changing Name property for all Pages using Javascript

Recommended Posts

Hi All,

 

I am trying to use the HTML TITLE tag under HEAD to use under the Name property for each page. The same has to be used using JavaScript and once the script has been verified than all the Page names should get changed as per the Title tag. This will in turn help in easier viewing of the Report. And effort will be saved for each and every user entering individual page names.

 

 

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>

ABC :: Log On

</title>

 

 

JavaScript can be accessed using

var title = context.document.getElementsByTagName("title")[0].innerHTML;

 

 

How can we access the internal Name property and set the same using variable created in Javascript

Share this post


Link to post
Share on other sites

Thanks a lot for your quick response. But in this case $Search would only work when i wish to set the title for the first page to the second page which would be incorrect. Is there any other way which would help set the Page Name as Title of the same page

Share this post


Link to post
Share on other sites

We have a lot of scenarios to record and most of the scenarios go upto 400 pages or even more.

 

Also Page Names are set as Page URL's by default so the execution report finally is a lengthy one and its difficult to read because in most cases on the application under test URL's are appended with Invoice ID'S which is a very long one.

 

Hence we are looking at setting Page Names in a more distinguishable good manner so it would reduce manual effort of changing page names one by one and add value to the final report.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...