Advanced navigation  One-click

Chapter 3: Developing Applications

Capture formats

The capture strategies listed in the Format 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 format. For example, if you want to capture tabular data on a page, try using the Grid format.

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 formats include:

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

The one-click and DOM formats 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 format, 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 format 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.





Copyright © 2005. Sybase Inc. All rights reserved. One-click

View this book as PDF