Color comparison test in QTP

How qtp compares the 2 colors.( suppose we have two pages of bg color one is pink and the other is blue.when we inserted the checkpoint to check these two pages the test will fail. my question is how does the qtp know the color comparison.) (1.one answer may be pixel checking). plz think abt another.

Showing Answers 1 - 3 of 3 Answers

mm.achar

  • Mar 12th, 2007
 

I would have coded this way,

Suppose there is a page with background whose colour is blue. First I will capture the colour of the page by,

page_bgcolour = Browser("").Page().GetROProperty("Color")

Then  compare the colour  with a  vbscript constant.

If page_bgcolour =  vbBlue then
msgbox  "colour is blue"
else
msgbox "colour is " & page_bgcolour
end if

  Was this answer useful?  Yes

siva

  • Mar 13th, 2007
 

I agree with the previous answer. Also we can do so by using Text Area check point.

  Was this answer useful?  Yes

msusmitha

  • Mar 27th, 2007
 

hi


 why writing the script put the checkpoint and just drag the place which you want to check the colour while putting the bitmap checheck point.


susmitha

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions