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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×