| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <title>2.4. Creating CAP instances</title> |
| <link rel="stylesheet" type="text/css" href="../../css/style.css"> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> |
| <link rel="home" href="../index.html" title="Jubula Developer Manual"> |
| <link rel="up" href="clientAPI.html" title="Chapter 2. Writing UI tests via API"> |
| <link rel="prev" href="ch02s03.html" title="2.3. Exporting the Object Map in the ITE"> |
| <link rel="next" href="ch02s05.html" title="2.5. General setup information"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <div class="navheader"> |
| <table width="100%" summary="Navigation header"> |
| <tr><th colspan="3" align="center">2.4. Creating CAP instances</th></tr> |
| <tr> |
| <td width="20%" align="left"> |
| <a accesskey="p" href="ch02s03.html">Prev</a> </td> |
| <th width="60%" align="center">Chapter 2. Writing UI tests via API</th> |
| <td width="20%" align="right"> <a accesskey="n" href="ch02s05.html">Next</a> |
| </td> |
| </tr> |
| </table> |
| <hr> |
| </div> |
| <div xmlns:d="http://docbook.org/ns/docbook" class="breadcrumbs"> |
| <span class="breadcrumb-link"><a href="../index.html">Jubula Developer Manual</a></span> > <span class="breadcrumb-link"><a href="clientAPI.html">Writing UI tests via API</a></span> > <span class="breadcrumb-node">Creating CAP instances</span> |
| </div> |
| <div class="section"> |
| <div class="titlepage"><div><div><h2 class="title" style="clear: both"> |
| <a name="creating-cap-instances"></a>2.4. Creating CAP instances</h2></div></div></div> |
| <div class="figure"> |
| <a name="toolkit-factories"></a><div class="figure-contents"><div class="mediaobject"><img xmlns:d="http://docbook.org/ns/docbook" src="../images/tk-factories.png"></div></div> |
| <div class="figure-title">Figure 2.4. JavaFX-Toolkit component factory usage to create an instance for a CheckBox</div> |
| </div> |
| <br class="figure-break"><p>In order to create executable instances of a <span class="emphasis"><em>org.eclipse.jubula.communication.CAP</em></span> (Test Step) you have to use the corresponding |
| factory methods available for each toolkit and pass a valid and fitting ComponentIdentifier:</p> |
| <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> |
| <li class="listitem"><p>org.eclipse.jubula.toolkit.javafx.JavafxComponents - see e.g. the <a class="xref" href="creating-cap-instances.html#toolkit-factories" title="Figure 2.4. JavaFX-Toolkit component factory usage to create an instance for a CheckBox">Figure 2.4, “JavaFX-Toolkit component factory usage to create an instance for a CheckBox”</a></p></li> |
| <li class="listitem"><p>org.eclipse.jubula.toolkit.swing.SwingComponents</p></li> |
| <li class="listitem"><p>org.eclipse.jubula.toolkit.html.HtmlComponents</p></li> |
| <li class="listitem"><p>org.eclipse.jubula.toolkit.swt.SwtComponents</p></li> |
| <li class="listitem"><p>org.eclipse.jubula.toolkit.ios.IosComponents</p></li> |
| <li class="listitem"><p>org.eclipse.jubula.toolkit.winapps.WinappsComponents</p></li> |
| <li class="listitem"><p>org.eclipse.jubula.toolkit.win.WinComponents</p></li> |
| </ul></div> |
| <p>On these UI component placeholder instances you can call methods that will return |
| an executable CAP that, when being executed on the AUT connection, |
| performs the specified test step:</p> |
| <div class="figure"> |
| <a name="cap-factory-methods"></a><div class="figure-contents"><div class="mediaobject"><img xmlns:d="http://docbook.org/ns/docbook" src="../images/cap-factory-methods.png"></div></div> |
| <div class="figure-title">Figure 2.5. Creating a CAP instance</div> |
| </div> |
| <br class="figure-break"> |
| </div> |
| <br xmlns:d="http://docbook.org/ns/docbook"><hr xmlns:d="http://docbook.org/ns/docbook"> |
| <address xmlns:d="http://docbook.org/ns/docbook">Copyright BREDEX GmbH 2015. Made available under the Eclipse Public License v1.0.</address> |
| <br xmlns:d="http://docbook.org/ns/docbook"> |
| </body> |
| </html> |