Capture strategies

The capture strategies listed in the Capture Strategy drop-down of the Web Element wizard represent the different elements on a Web page that Mobile Web Studio can capture. Because of the dynamic nature of Web content, choosing a capture strategy when creating a Web application is sometimes a matter of trial and error. The default One-click format works for most captures. However, if you do not get the expected results, experiment and try a different strategy. For example, if you want to capture tabular data on a page, try using the Grid strategy.

The Document Object Model (DOM) format is useful for pages that are built using a templating mechanism, where content is filled in to various cells of the template. If you want to always get the content of a particular cell from the template, using DOM is effective because the path to the cell of the template always returns the content from the cell, no matter what the content is. See “DOM”.

These available capture strategies include:

The Capture Option window displays all the instances of the particular HTML object found on a Web page.

The one-click and DOM strategies start another stage in the capture process. When you select either one-click or DOM, the Web content that you can select from using the cursor displays. If you are using one-click, a list of matching elements from the smallest element closest to the point clicked, to the outer most element (the entire page) displays. If you are using the DOM strategy, HTML DOM paths are used to uniquely locate an element on a page. Because HTML paths exist for all items on a page, you have more items to choose from compared with the one-click format, however, this is not always the best method as the DOM strategy requires that items be “fixed” on a page.

Whether one-click, DOM, or Grid is more effective depends on page content, the likelihood of the content changing rapidly, and how it changes. These formats are the most frequently used and work for most situations. Each of these formats is covered in more detail in the next sections.