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:
One-click – allows you to navigate to one page and click through the navigation links on that page to capture the desired content.
Applets – returns a list of all applets on the page.
Area – allows you to capture a selection of areas such as table, cell content, or form content, plus similar miscellaneous areas.
Buttons – specifies a combination of text and img within <a> and </a> tags. Selecting buttons shows a list of these combinations.
Grids – defines table content formed into a grid for grid rules processing.
Images – HTML img element.
Image Maps – defines an image with clickable regions.
Lists – specifies sections within the <OL> or <UL> tags.
Forms – specifies that the contained controls take part in a form.
OP Tags – specifies HTML enclosed inside <optag> sections.
Visible Text – defines any section of text in any location.
Page – the default capture mode, represents the page.
PB Data Win – specifies sections of code inside PBDatawindow HTML output.
DOM – allows programs and scripts to dynamically access and update the content, structure, and style of documents. See “DOM”.
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. |
![]() |