Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enable Hyperlink without opening the Excel
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi Friends,
The common function we are using will do the following.
1. Execute the script
2. Take the screenshots (.PNG format)of the passed and failed test cases
3. Place the screenshots in the mentioned folder in the local PC
4. Update the screenshot path in the specified column in the excel from where the actual inputs are
i want to add [/font]hyper link to the screenshotpath in excel
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
HI Sathiya,

Please create an excel object and then use the Hyperlinks method to create the hyper link.

snippet:
Code:
Set  objEx = CreateObject("Excel.Application")

HI Sathiya,

Please create an excel object and then use the Hyperlinks method to create the hyper link.

snippet:
Code:
Set objEx = CreateObject("Excel.Application")
'Example: ScreenShotName = screenshotFolderPath & screenshotName(UserDefined)  & ".png"
ScreenShotName = screenshotFolderPath & Environment.Value("ActionName") &SetDateFormat(now(), "mm-dd-yyyy HH-nn-ss")  & ".png" ' here we are giving the dynamic name for screenshot with time stamp.
Set objLink = objEx.ActiveWorkbook.ActiveSheet.HyperLinks.Add (objEx.Selection,screenshotName)

Let me know if you need any further info.
Thanks,
SUpputuri
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
hi friend,
thanks for your reply....
but the above idea is not working... i am trying for the solution.
Reply
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
hi Sathiya,
Is there any error message? Can you please share that so that I can have a quick thought the error...

Thanks,
SUpputuri
Reply
#5
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,
the script runs without any error. at the same time hyper link not enabled
Reply
#6
Solved: 11 Years, 3 Months, 4 Weeks ago
you mean, when you click on the hyperlink it's not bringing the error image?

Thanks,
SUpputuri
Reply
#7
Solved: 11 Years, 3 Months, 4 Weeks ago
after executing the script the screenshot path column value has the normal text values (hyperlink not enabled).
Reply
#8
Solved: 11 Years, 3 Months, 4 Weeks ago
OK. Can you validate that the cell format. I think the cell format is marked as other than General.
Thanks,
SUpputuri
Reply
#9
Solved: 11 Years, 3 Months, 4 Weeks ago
format is "General"
Reply
#10
Solved: 11 Years, 3 Months, 4 Weeks ago
hi
after running the script the cell values has underline but hyperlink not get enabled...
any solutions?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error while opening test run results vkalyankar 3 4,318 11-12-2014, 09:49 AM
Last Post: vinod123
  Hyperlink click is not automated in UFT 11.5 test run prinju 1 2,796 11-03-2014, 12:04 PM
Last Post: vinod123
  QTP Stuck at Opening stage TurtleRock 4 3,676 05-27-2014, 08:42 PM
Last Post: mauler69
  QTP is not recording the first step of opening Flight reservation app srinanduri 2 3,173 08-06-2013, 09:59 PM
Last Post: srinanduri
  Having issue in opening QTP test newqtp 0 1,887 01-22-2013, 08:47 PM
Last Post: newqtp

Forum Jump:


Users browsing this thread: 3 Guest(s)