Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Identifying objects on Desktop
#2
Solved: 10 Years, 9 Months, 1 Week ago
Hope the below help to get some idea.
Code:
Set Shell = CreateObject("WScript.Shell")
DesktopPath = Shell.SpecialFolders("Desktop")
Set fso = CreateObject("Scripting.FileSystemObject")
Set fol = fso.GetFolder(DesktopPath)
Set files = fol.Files
For each fil In files
  filname=Mid(fil.name,1,instr(1,fil.name,".")-1)
' replace Adobe Reader 8 with the icon name you looking for
  reqapp=(Strcomp(filname,"Adobe Reader 8"))
   If  reqapp then
   Else
  ' write you code for activate it        
   End If
Next

make sure the icon you are looking available in your personal desktop folder more than common user folder. if its not so means just copy and paste it in your desktop folder.
Reply


Messages In This Thread
Identifying objects on Desktop - by rahul29 - 02-23-2012, 04:42 AM
RE: Identifying objects on Desktop - by inborntester - 02-23-2012, 10:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to deploy a desktop application to a physical server using Azure Pipelines? raivivan 0 935 04-08-2022, 04:46 PM
Last Post: raivivan
  UFT 14.01 - identifying wpf objects. but not performing action. chinmoyee 1 2,357 11-15-2017, 03:42 PM
Last Post: Ankur
  Objects identifying as WinObjects on IE with QTP/UFT santhosh kumar 5 5,242 05-07-2016, 12:39 PM
Last Post: vinod123
  QTP 10 not identifying objects in IE8 on 64 bit OS Ram2009 6 4,441 03-24-2015, 05:46 PM
Last Post: vinod123
  QTP 9.0 supports WPF based .NET desktop application. nagarajkv 1 2,526 02-27-2014, 03:48 PM
Last Post: hiregoudar

Forum Jump:


Users browsing this thread: 1 Guest(s)