How to read registry key in UFT......?
'Create a shell object
Set WshShell = CreateObject("WScript.Shell")
'Read the value of key from the registry
bvalue = WshShell.RegRead(varpathofkey)
'in above function we have to pass the path of key in registery.
e.g. HKCU\Software\ie\settings
msgbox bvalue
How to read/write a value in the registry key....?
In some scenarios for troubleshooting/workarounds it is requested to modify the value of a registry key. If this modification is necessary to be perform in more than one machine.
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\Software\Mercury Interactive\QuickTest Professional\MicTest\Packages\WebPackage\Settings\IgnoreHiddenFrames", 1, "REG_DWORD"
Nothing = WshShell
Note:
Where "IgnoreHiddenFrames" is the key to modify. The value to write is "1" and the type is "Dword"
Example:
in case you need to read the value, before modifying it.
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.RegRead "HKCU\Software\Mercury Interactive\QuickTest Professional\MicTest\Packages\WebPackage\Settings\IgnoreHiddenFrames"
Nothing = WshShell
No comments:
Post a Comment
Note: only a member of this blog may post a comment.