11-21-2007, 11:00 AM
Some tips.
In recorded code, remove parts that click taskbar, eg this and other lines where is w1:
int w1=win("" "Shell_TrayWnd")
lef 588 15 w1
To make the code independent from the document, remove document names in window names. Or, if class is unique, remove whole name:
int w3=act(win("" "IEFrame"))
In htm and other places, if you have window handle, use it instead of win(...):
Htm el=htm("A" "Christmas" "" w3 0 6 0x21) ;;find the link
el.Click ;;click it
In htm, use a wait time to wait until the page is loaded:
el=htm("B" "More Info" "" w3 0 39 0x21 60) ;;find a link in the next page, and also wait for it max 60 s
Remove multiple Htm before the same variable (see above).
----
(255) is a key, probably Fn.
----
Like with window names, removing or changing some parts from htm code should make it not specific to the product. But not sure, I need to see the page and test, but cannot access it. See htm documentation in QM help.
el=htm(...)
el.Mouse(2)
In recorded code, remove parts that click taskbar, eg this and other lines where is w1:
int w1=win("" "Shell_TrayWnd")
lef 588 15 w1
To make the code independent from the document, remove document names in window names. Or, if class is unique, remove whole name:
int w3=act(win("" "IEFrame"))
In htm and other places, if you have window handle, use it instead of win(...):
Htm el=htm("A" "Christmas" "" w3 0 6 0x21) ;;find the link
el.Click ;;click it
In htm, use a wait time to wait until the page is loaded:
el=htm("B" "More Info" "" w3 0 39 0x21 60) ;;find a link in the next page, and also wait for it max 60 s
Remove multiple Htm before the same variable (see above).
----
(255) is a key, probably Fn.
----
Quote: Click Thumbnail image to view the next detail
Here i am using co-ordinates, rather than identifying the element, to click on the image so that i can see the next level of product detail.
Here if i use the identify HTML element, it will be specific to the product, and i don't know how to change that for the next product in the loop ???
Like with window names, removing or changing some parts from htm code should make it not specific to the product. But not sure, I need to see the page and test, but cannot access it. See htm documentation in QM help.
Quote: Here I'm trying to view the Large jpg image..and the best way i could work it was to open it in a full window as a new 'open link' command, from the right clcik menu on the image.
BUT, i have randomly selected co-ordinates to find the area where the image should appear !!
el=htm(...)
el.Mouse(2)
