iMacros-Checkpoints

1.Text Checkpoint

This TAG line is now a text checkpoint! If the text is not found, iMacros will report an error. If you want to report an error if a text is found, use FAIL_IF_FOUND:
TAG POS=1 TYPE=LI ATTR=TXT:Comprehensive<SP>CRM<SP>capabilities CONTENT=EVENT:FAIL_IF_FOUND
 

2.Image Checkpoint

(a) Check that an image is present

The Save Item function includes an image checkpoint. If a image is missing, an error will occur. Example:
CLEAR
TAG POS=1 TYPE=IMG ATTR=TXT:*bee.jpg CONTENT=EVENT:SAVEITEM
TAG POS=1 TYPE=IMG ATTR=TXT:*shark.jpg CONTENT=EVENT:SAVEITEM
This macro will download two images. If one image is missing on the web page the macro stops with an "image not found" error. To make sure that the missing image is not stored in the browser cache it is recommended that you use the CLEAR command before this test.

This technique is also recommended if you are automating or testing web sites with complex frames. To make sure a specific frame is completely loaded do the above test for a specific image in this frame. iMacros will wait at the TAG.....EVENT:SAVEITEM command until this image appears.

The method is easily implemented if you have information about the image such as its own URL, the link URL or the alternative text. If all you have is the image itself use the IMAGESEARCH command of the Image Recognition Plugin.

(b) Check the content of an image

Please use the IMAGESEARCH command if you need to verify the content of an image.

 

3.Web Table Checkpoint

iMacros allows you to extract a complete table and then verify its content via the Scripting Interface. You can also adress specific table elements with the Relative Extraction / Relative TAG command feature and verify them directly in the macro.
Example:http://wiki.imacros.net/Data_Extraction#Extract_with_relative_Positioning

4.XML Checkpoint

An XML checkpoint checks the contents of individual XML data files or XML documents that are part of your Web application.

iMacros can save XML documents and/or return the content of an XML to the calling script. You can use the standard XML functions available in all modern scripting languages to test the XML content in details (e. g. use Microsoft.XMLDOM in VBS).

5.Performance Checkpoint

This command can be used for website response time measurement. Using different IDs in one macro different processes can be timed separately from each other. By default the measured data is stored in the download directory of iMacros. You can change the file location with the !FILESTOPWATCH variable. (PRO and SCRIPTING Editions only).
 
Example:

6.Database Checkpoint

A database checkpoint checks the contents of databases accessed by your web site. iMacros can interface with databases via its Scripting Interface. You can verify database content directly in the scripting language that you use.

7.Page Checkpoint

A page checkpoint checks the characteristics of a web page.

iMacros does not in have a page check point. We recommend to use the other checkpoints instead.If you need to verify the complete page, you can use the SAVE command to save a website (with or without images) and compare it to a reference page via the Scripting Interface. You can also check for Javascript errors automatically.

posted on 2013-05-03 14:47  ibelieve  阅读(819)  评论(0编辑  收藏  举报

导航