How can you test font size, type and color using QTP tool?

Answers were Sorted based on User's Feedback



How can you test font size, type and color using QTP tool?..

Answer / dharit shah

Set oWebElement = Browser("START").Page("START").WebElement
("ResizeText")
'Grabe the WebElement’s Runtime-Object’s CurrentStyle object
Set oStyle = oWebElement.Object.CurrentStyle
Msgbox oStyle.Color
Msgbox oStyle.fontWeight
Msgbox oStyle.fontStyle
Msgbox oStyle.fontSize

Is This Answer Correct ?    8 Yes 5 No

How can you test font size, type and color using QTP tool?..

Answer / poorna

I am getting the following error

General run error.
Line (2): "Set oStyle = oWebElement.Object.CurrentStyle".

Is This Answer Correct ?    2 Yes 0 No

How can you test font size, type and color using QTP tool?..

Answer / venu

Set oWebElement = Browser("START").Page("START").WebElement
("ResizeText")
'Grabe the WebElement’s Runtime-Object’s CurrentStyle object
Set oStyle = oWebElement.Object
Msgbox oStyle.currentStyle.color
Msgbox oStyle.currentStyle.fontWeight
Msgbox oStyle.currentStyle.fontStyle
Msgbox oStyle.currentStyle.fontSize

This should work I think!

-Venu

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More VB Script Interview Questions

What is vbscript?

0 Answers  


Mention what is vbscript procedures?

0 Answers  


PLz send me the VB scripts which is having more examples my email id : hareen_11@yahoo.com

0 Answers  


how to add the shared repository file to the script file while running the script manuall

2 Answers  


Dear All, I am geting below IE error whilie executing the QTP scripts in Batch mode "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience." can any one suggest me how to resolve this issue . Thanks Balaji

0 Answers  






Explain about the extension .hta?

0 Answers  


Is vbscript a case-sensitive or case-insensitive?

0 Answers  


Can anyone send me a vb script function for verifying the functionality of active links on a web page

0 Answers   Zensar,


VBscript for QTP,best tutorial?

2 Answers   Wipro,


How do I check that the names in a weblist are correct e.g in flight application the names of item are Denver, paris,London, etc. How do I ensure the correct item is displayed from the list after doing item count ?

2 Answers   IBM,


There are 5 web pages.write a script to click the button on 4th web page.

0 Answers   Accenture,


how to find the textfile in the folder and copy file from one folder to another folder useing parameterigation in QTP

1 Answers   Accenture,


Categories