How to test background color and dynamic images which are
moving during runtime?

Answer Posted / xyz

i am not sure about testing the back groung color but
the code below
Dim ctrlWebEl, objWebEl
Set ctrlWebEl =Browser("Google").Page("Google").Link("Go to
Google.com")
Set objWebEl = ctrlWebEl.Object

sColor = objWebEl.currentStyle.color
sBackgrColor = objWebEl.currentStyle.backgroundColor
sFontSize = objWebEl.currentStyle.fontSize
sFontStyle = objWebEl.currentStyle.fontStyle
sFontFamily = objWebEl.currentStyle.fontFamily
sFontWeight = objWebEl.currentStyle.fontWeight
msgbox
(sColor&" "&sBackgrColor&" "&sFontSize&"
"&sFontStyle&" "&sFontFamily&" "&sFontWeight
)

helps us to get the color of a link or a webelement

we can do this using standard check point as well
not sure if this is the answer for ur questions

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which advantages helping QTP to hold the position of "Market Leader" for such a long period?

1353


How to break the object spy ?

639


How to get popup error message.

1004


How to handle dynamic objects in quicktest professional?

476


How to get the format of a webedit class in qtp. How can i know that particular webedit accept what type of format like "mm/dd/yyyy" or "$" or Alphanumeric

1611






Explain in brief about the quicktest professional (qtp) automation object model?

535


Explain the qtp test phases.

588


How to handle the exceptions using the recovery scenario manager in qtp?

547


Discuss quicktest professional (qtp) environment?

550


hi can anybody help with an qtp 9.2 license key please. Thanks, Nitesh.

1808


when I try to run below script in QTP "totalPages" value is 2. But i am getting error message (Type mismatch: 'totalPages' Line (): "For i=1 to totalPages".) totalPages=Browser("Name:=User").Page("Title:=User").WebElem ent("innertext:=of.*").GetROProperty("InnerText") msgbox totalPages For i=1 to totalPages rnum=Browser("Name:=User").Page("Title:=User").WebTa ble("column names:=User Name;ID;Last Name;First Name").GetRowWithCellText("store4") If rnum>0 Then r=rnum Exit for End If Browser("Name:=User").Page("Title:=User").WebElement ("html tag:=A","x:=471").Click MsgBox "Exit" Next

3232


What is the difference between per-action and shared?

568


How many tabs are available in debug viewer pane?

619


what are the mandatory properties for a tex boxc (scenario?)

1511


What is ObjectParamater?

1549