avin_mehya 0 Report post Posted August 3, 2015 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 Quote Share this post Link to post Share on other sites
sergei 0 Report post Posted August 5, 2015 You can just use WAPT function $Search and store the name into the variable. Quote Share this post Link to post Share on other sites
avin_mehya 0 Report post Posted August 6, 2015 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 Quote Share this post Link to post Share on other sites
sergei 0 Report post Posted August 7, 2015 Why do you need to change the name of the current page? Could you describe your need in more detail? Quote Share this post Link to post Share on other sites
avin_mehya 0 Report post Posted August 10, 2015 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. Quote Share this post Link to post Share on other sites
iqra_faqraz 0 Report post Posted August 17, 2015 You can just use WAPT function $Search and store the name into the variable. i like it Quote Share this post Link to post Share on other sites