AJAX-Tree


SUBMITTED BY: rilp44

DATE: Dec. 6, 2015, 9:59 a.m.

FORMAT: Text only

SIZE: 1.0 kB

HITS: 16892

  1. This script automates an AJAX tree view, using drag & drop. Note that this solution does '''not''' require fixed coordinates, rather it uses the position of certain HTML page element, as returned by the [[!TAGX]] and [[!TAGY]] variables. With this method, iMacros can '''locate (and move) tree elements anywhere on the page'''. The only requirement is that the tree elements are visible in the web browser, so the [[DirectScreen]] command can grab and move them.
  2. <nowiki>
  3. VERSION BUILD=10.4.28.1074
  4. TAB T=1
  5. TAB CLOSEALLOTHERS
  6. URL GOTO=http://demo.imacros.net/Automate/DragDropDemo
  7. SIZE X=1050 Y=750
  8. SET !EXTRACT_TEST_POPUP NO
  9. 'select Germany node from treeview and move it to the first position
  10. 'Use EXTRACT to avoid to "click" on the element
  11. TAG POS=1 TYPE=A ATTR=TXT:Germany EXTRACT=TXT
  12. DS CMD=LDOWN X={{!TAGX}} Y={{!TAGY}}
  13. WAIT SECONDS=1
  14. 'find Europe node and move Germany here
  15. TAG POS=1 TYPE=A ATTR=TXT:Europe EXTRACT=TXT
  16. DS CMD=MOVETO X={{!TAGX}} Y={{!TAGY}}
  17. DS CMD=LUP X={{!TAGX}} Y={{!TAGY}}

comments powered by Disqus