Skip to main content
summaryrefslogtreecommitdiffstats
blob: c173cb6ea8fafbce5601171bfd41b3e60509b3cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!-- 
  Copyright (c) 2014 BREDEX GmbH.
  All rights reserved. This program and the accompanying materials
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
  http://www.eclipse.org/legal/epl-v10.html
-->

<section xml:id="actionsForStoringValuesGeneral" version="5.0" xmlns="http://docbook.org/ns/docbook"
                                                    xmlns:xi="http://www.w3.org/2001/XInclude"
                                                    xmlns:xl="http://www.w3.org/1999/xlink" >
  <title>Store Property/Value (General Components)</title>
  
  <para><emphasis>Store Property</emphasis></para>
  <para>
    <itemizedlist>
      <listitem>
        <para>
          Use this action to store the value of a specific property of a component.
        </para>
      </listitem>
      <listitem>
        <para>
          You can then use this value later in your test, or check whether two values you store are the same or different using the actions to Check Numeric Values and Check String Values on the Application component.
        </para>
      </listitem>
      <listitem>
        <para>
          Every component has properties (attributes). These can include the text size, the size (width/height) of the component, the color etc.
        </para>
      </listitem>
      <listitem>
        <para>
          You must first find out the name of the property you want to check, and then what value it should have. You can find out what properties and values a component has in the Object Mapping Mode (for Swing and SWT/RCP AUT's ). When you collect a component, its property information is displayed in the Properties View .
        </para>
      </listitem>
      <listitem>
        <para>
          For HTML AUTs using a Webdriver you can use this action to test CSS attributes or any other property of an element.
          This is how the action works on such AUTs:
            <itemizedlist>
                <listitem><para>First the attributes of the element are searched, and if the property is found there, its value is returned.</para></listitem>
                <listitem><para>If the property is not yet found, the element's CSS properties are searched.</para></listitem>
                <listitem><para>If the property is still not found, the HTML element's properties are searched, using <literal>/</literal> as a separator.</para></listitem>
            </itemizedlist>
        </para>
        <para>
          As an example, there are two ways to check the color of an HTML element: either by checking the property <literal>color</literal>, or the property <literal>style/color</literal>.
          Please note that the actual value returned is strongly browser-dependent, e.g. for color, Firefox would return something like <literal>rgb(255, 0, 0)</literal> and Chrome <literal>rgba(255, 0, 0, 0)</literal>.
        </para>
      </listitem>
      
      <listitem>
        <para>
          Parameters:
          
          <itemizedlist>
            <listitem>
              <para>
                <xref linkend="variable_name" xrefstyle="template:%t"/>
              </para>
            </listitem>
            <listitem>
              <para>
                <xref linkend="property_name" xrefstyle="template:%t"/>
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
    </itemizedlist>
  </para>
  
  <para role="tip">
    If the property is <emphasis>private</emphasis>, it cannot be stored, the remote control component has no access to it.
  </para>
  
  <para><emphasis>Store Value (on components that show a text)</emphasis></para>
  <para>
    <itemizedlist>
      <listitem>
        <para>
          Use this action to read the value out of a field so that you can use it as data for other Test Steps .
        </para>
      </listitem>
      <listitem>
        <para>
          Parameters:
          
          <itemizedlist>
            <listitem>
              <para>
                <xref linkend="variable_name" xrefstyle="template:%t"/>
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </listitem>
    </itemizedlist>
  </para>
</section>

Back to the top