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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are class variables?

617


Explain what is loose binding? Why is it not a good practice to use it?

580


can anyone tell me the procedure of interview held in applabs

1750


What are class events?

581


Explain the constants in vbscript?

563






Mention if qtp generates vbscript code as we record actions, can't it possible to directly write using vbscript code when qtp does the same thing too?

525


How will you convert a string to upper case string using vbscript?

551


Explain the filter expression?

629


Explain about the functionality of vb script?

573


When are redim statement and preserve keyword used in the vbscript language?

595


Mention the environments where vbscript could be run?

658


Hi All, I am facing one problem in QTP. There is link object in my application that exist in the Frame in mozilla firefox. Click event on that object is not working but once the frame is enabled/activated then click event works fine.But the frame does not have the activate property. This problem is coming in firefox only. Regards

2260


How will you get the last occurrence of one string within another string using vbscript?

685


What are the 2 ways in which a variable can be declared in the vbscript language?

564


How can the spaces from the string be removed?

591