| || |
I encountered a code for selecting a row near the text “price” as follows:
PbDataWindow(“main”).PbDataWindow("dw_page1").GetT extLocation "Price:" ,l,t,r,b,False
PbDataWindow(“main”).PbDataWindow("dw_page1").Mous eMove l+70,t+3
PbDataWindow(“main”).PbDataWindow("dw_page1").Clic k l+70,t+3,0
1.There is a use of offsets in absolute pixel numbers (70,3 etc’), Is it safe to use this code in other resolutions as well?
2.Are the parameters (l,t,r,b) relative to the upper left corner of the window or to other
(It is not mentioned in the help)?
3. The code functioned well for first execution (selecting a specific row), but did not for another consecutive executions (for other texts) in the script, is it related to resetting the parameters (-1 or other) before using again this code?
4. In the QTP HELP there is an example of clicking on a center of a button:
center_x = right_x - left_x
center_y = buttom_y - top_y
windowTO.Click center_x, center_y
Why the delta is used and not the average as follows:
center_x= (right_x + left_x)/2
center_y= (buttom_y + top_y)/2
Re: GetTextLocation method
Dim l, r, b, t
x = Window("abc").Winobject("WinObject").GetTextLocati on(ImageName, l, t, r, b)
The application hangs when this code is run.Any idea wats the issue