QTP flex 根据段值的不一样颜色变化, 怎么测
我们flex项目作Bullet chart, bar chart,需要验证段值的不一样颜色的变化QTP 把chart看成一个整体,验证不了段值的不一样颜色的变化,在属性里面看不到段值的变化.
请问有什么办法? 你应该是说的详细一点,现在看不明白 Hi Arivn,
就是有个条状图表,然后根据段值(比如1000,2500,3000)的不同,每一段的颜色不一样。
简单说,比如一条甘蔗,如果颜色有绿色,黄色,灰色等等。QTP Flex 4.0add-in把整条甘蔗看成一个整体,所以取不出各个段值的颜色。赫赫。 这个比喻很恰当 我试图用Description对象,一直报对象描述非唯一
set odesc=description.create()
odesc("rect id").value="aaa"
odesc("data1.actual")=63
browser().Sparkapplication().SparkPanel().FlexRepeater().SparkGroup().SparkSkinnablecontainer(odesc).GetRoProperty()
这个条状图体现4种数据:目标值,标准值,实际值,平均标准值. 然后各个段各标准值对比大小会呈现不同的颜色. 本帖最后由 LaylaWX 于 2010-12-30 17:51 编辑
pls see the attached screenshot. tnx 可以考虑一下这种做法:
获取指定位置的color值
Dim hDC, hWndDim iX, iY
'Declare win32 and gdi32 functions
Extern.Declare MicLong, "GetPixel", "gdi32″, "",MicLong, MicLong, MicLong
Extern.Declare MicLong, "GetDC", "user32″,"", MicLong
Extern.Declare micLong,"ReleaseDC","user32″,"",micLong,micLong
'Attach to the desktop graphical context
hWnd = cLng(0)
hDC = Extern.GetDC(hWnd)
iX = 10 'Change this to your relevant X coordinate
iY = 10 'Change this to your relevant Y coordinate
'Get the pixel color code
Print Extern.GetPixel (hDC, iX,iY)
'Release the graphical context
Extern.ReleaseDC hWnd, hDC Hi gztester,
run error:
the test run cannot continue due to a syntax error
Unterminated string constant
Line(5):"Extern.Declare MicLong, "GetPixel","gdi32","",MicLong,MicLong,MicLong". Hi gztester,
run error:
the test run cannot continue due to a syntax error
Unterminated string constant
Line(5):"Extern.Declare MicLong, "GetPixel","gdi32","",MicLong,MicLong,MicLong". 下面是视察出的属性图C:\Documents and Settings\D348730\Desktop\spy 1.GIF
C:\Documents and Settings\D348730\Desktop\spy 2.GIF
C:\Documents and Settings\D348730\Desktop\spy 3.GIF 本帖最后由 LaylaWX 于 2011-1-6 10:07 编辑
下面是视察出的属性图file:///C:/Documents%20and%20Settings/D348730/Desktop/spy%201.GIF
file:///C:/Documents%20and%20Settings/D348730/Desktop/spy%202.GIF
file:///C:/Documents%20and%20Settings/D348730/Desktop/spy%203.GIF 里面坐标值都没变化, 不管鼠标放哪里
页:
[1]