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

Diff between web table ,datatable and data base (QTP)

2 Answers   TCS,


Mention what if you do not specify anything when you call a procedure?

0 Answers  


wat is com(common object model)object for mozilla firefox??? if any knows the exact answer....plz rply me

2 Answers  


In QTP how to insert a data base check point for web based application and simultaneous link to code in expert veiw. hw to retrieve a data(single coulumn from server) that matches with inserted value manually or exported from excel sheet.

2 Answers  


How to capture a runtime error in vbscript?

0 Answers  






What is the technology used by vb script?

0 Answers  


how to store charecters of HARIBABU Using arrays

4 Answers   Cap Gemini,


What is the difference between VBScript and JavaScript?

0 Answers  


How to Import data from a file (file is on the desktop) to the data table

0 Answers   IBM,


What are the uses of vb script?

0 Answers  


I want to import the sheet from the Excel to the Datatable using VB Script. I used the Syntax as 'Datatable.ImportSheet "Filename","SourceSheet","Destinat ionSheet" Ex: Datatable.ImportSheet "D:\Data1.xls","Sheet1","Global" Qtp producing run time error,How I can solve the problem

1 Answers  


sunday is sunday monday tuesday wendesday sunday thursday friday saturday sunday sunday how to count no of sunday in the text file from vb? Answer me asap

4 Answers  


Categories