How can you test font size, type and color using QTP tool?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Hi, Anybody could tell me What is the script for Reverse of Given number. Ex:236--632. Thanks in Advance..
Does VB/Win make standalone .EXE files?
How will you get a random number between 0 and 1 in vbscript?
What are the different types of operators and their order of precedence?
HOW TO OPEN NEW TAB USING VB SCRIPT IN QTP?
write a vb-script code to delete all the mails in my gmail in the year 2011
what is the code in QTP to take screen shot? Please send me any one to my mail id. my mailid is manu.sanepalli@gmail.com
Whenever I use Wscript.Echo Qtp raising Run time error as 'Object required for Wscript' How I can create object for Wscript
what is descriptive programming in QTP and what is environment variable in QTP? where we store and what is its use?
Hai this is sheik, i want to learn VB scripts for web application pls guide me what are all basic things need to know to learn VB scripts in web application.
Explain the functionality of vbscript?
hi Set myobj=Description.Create() myobj("type").value="submit" myobj("name").value="google search" myobj("html tag").value="button" browser("title:=google").page("title:=google").webButton (myobj).Click i was running above code in one weak back it was working fine i got result,again i opened after few days ,again i was trying to run the code it shows run time error in last line of my code ,why ?pls answer my question?