Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ACC and HTML
#2
Code:
Copy      Help
;open www.download.com and wait until fully loads
web "http://www.download.com/" 0x1
;set search text and click Go button
Htm el=htm("INPUT" "qt" "" "Download.com" 0 5 0x221)
el.SetText("Quick Macros")
el=htm("INPUT" "searchGo" "" "Download.com" 0 6 0x121)
el.Click
;wait for element "Results" max 60 seconds
el=htm("H1" "Results" "" "Download.com" 0 0 0x21 60)
;wait until fully loads
wait 0 I
;done
mes "Done"

This macro demonstrates 3 methods of waiting for web page. First - use web to open page and wait. Second - use htm to wait for an element that does not exist in current page but exists in new page. Similarly can be used acc too. Third - use wait 0 I. Dialogs are available for all three methods.

In this case wait 0 I does not work if you place it immediately after el.Click. Reason - browser begins downloading the page not immediately. Of course, simple delay also could be used instead of htm.

If htm waits, why there also is used wait 0 I? Because when the element appears, the page is still not fully loaded.

You need Internet Explorer or compatible browser, and QM version 2.1.5 or later.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)