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

how to get date format from system locale..format means neither long nor shor... format from system locale. i need like your date is mm/dd/yyyy formate or mm-dd-yy or with time like that. how to get.

2 Answers  


what is the difference between modular and data and keyword driven framework

0 Answers  


Hi I am having one folder with set of text files now i want to read and write that text files data into QTP. Any help plsss.

1 Answers  


hey please tell me how to retriev data from excel sheet which puts the login name and password in the application? plz send me the code..please help me

6 Answers   HP,


write a vb script to display 3*3 matrix

1 Answers  






How can you destroy an object in vbscript?

0 Answers  


What are the different types of operators and their order of precedence?

0 Answers  


hi, How will write a regular expression of date in VB scripting.

1 Answers  


Explain the asc function?

0 Answers  


what is extension of the file if its saved from recovery manger to some drive

1 Answers  


hai..friends ....what is the difference between function and sub procedure ....here every one know's theoretically here my question is what is the meaning of function can return the value and sub can't return the value...can you give one example with some values for that ....what does it mean ? how function can return the value...sub can not...any one please...........with example

1 Answers   Cap Gemini,


How will you get a string with the specified character the specified number of times in vbscript?

0 Answers  


Categories