07-28-2009, 05:40 PM
Hi All,
Please find the below LOC which will clear idea on how to work with the color and fonts.
(Copy and paste the code in QTP and Run)
-----------------------------------------------------------------------------------------
'Here is the simple piece of code to check the color,font,bgcolor,font-family.
--------------------------------------------------------------------------------------------
Please let me know if any one have any queries.
Please find the below LOC which will clear idea on how to work with the color and fonts.
(Copy and paste the code in QTP and Run)
-----------------------------------------------------------------------------------------
'Here is the simple piece of code to check the color,font,bgcolor,font-family.
Code:
Set wsh=CreateObject("WScript.Shell")
Dim lnkobj
If Browser("name:=Google").Page("title:=Google").Exist = False Then
SystemUtil.Run "C:\Program Files\Internet Explorer\IExplore.exe","http://www.google.com/"
End If
Set lnkobj =Browser("name:=Google").Page("title:=Google").Link("name:=Hindi").Object.currentStyle
wsh.popup "Link BackGround Color ="& lnkobj.backgroundColor,2,"Link BackGround Color"
wsh.popup "Link font size ="& lnkobj.fontsize,2,"Link font size"
wsh.popup "Link font family ="& lnkobj.fontfamily,2,"Link font family"
wsh.popup "Link font color ="& lnkobj.color,2,"Link font color "
wsh.popup "Link text alignment ="& lnkobj.textalign,2,"Link text alignment "
Set lnkobj=Nothing
Browser("name:=Google").Close
Please let me know if any one have any queries.
Thanks,
SUpputuri
SUpputuri