OpenKeyWord  Version: 426, Datum:
SeSimpleDataObjBase.cs
1 #region Header
2 /*
3  ==============================================================================
4  Author: Zoltan Hrabovszki <zh@openkeyword.de>
5 
6  Copyright © 2012, 2013, 2014, 2015 IT-Beratung Hrabovszki
7  www.OpenKeyWord.de
8  ==============================================================================
9 
10  This file is part of OpenKeyWord.
11 
12  OpenKeyWord is free software: you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation, either version 3 of the License, or
15  (at your option) any later version.
16 
17  OpenKeyWord is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with OpenKeyWord. If not, see <http://www.gnu.org/licenses/>.
24 
25  Diese Datei ist Teil von OpenKeyWord.
26 
27  OpenKeyWord ist Freie Software: Sie können es unter den Bedingungen
28  der GNU General Public License, wie von der Free Software Foundation,
29  Version 3 der Lizenz oder (nach Ihrer Wahl) jeder späteren
30  veröffentlichten Version, weiterverbreiten und/oder modifizieren.
31 
32  OpenKeyWord wird in der Hoffnung, dass es nützlich sein wird, aber
33  OHNE JEDE GEWÄHRLEISTUNG, bereitgestellt; sogar ohne die implizite
34  Gewährleistung der MARKTFÄHIGKEIT oder EIGNUNG FÜR EINEN BESTIMMTEN ZWECK.
35  Siehe die GNU General Public License für weitere Details.
36 
37  Sie sollten eine Kopie der GNU General Public License zusammen mit
38  OpenKeyWord erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
39 */
40 #endregion Header
41 
42 namespace OKW.GUI.Selenium
43 {
44  using System;
45  using System.Collections.Generic;
46 
47  using OKW.GUI;
48  using OKW.GUI.Selenium;
49 
53  public class SeSimpleDataObjBase : SeAnyWin // , IOKW_SimpleDataObj
54  {
55  #region Constructors
56 
57  public SeSimpleDataObjBase(string Locator)
58  : base(Locator)
59  {
60  }
61 
62  public SeSimpleDataObjBase(string fpsLocator, params OKWLocator[] fpLocators) : base (fpsLocator, fpLocators)
63  {}
64  #endregion Constructors
65 
66  #region Methods
67 
72  public override List<string> GetValue()
73  {
74  List<string> lvLsReturn = new List<string>();
75 
76  try
77  {
78  MyLogger.LogFunctionStartDebug("GetValue");
79  throw new NotImplementedException("GetValue muss noch objektspezifisch implementiert werden.");
80  }
81  finally
82  {
83  MyLogger.LogFunctionEndDebug();
84  }
85  }
86 
97  public override List<string> LogValue()
98  {
99  bool bOK = false;
100  List<string> lvLsReturn = new List<string>();
101 
102  try
103  {
104  MyLogger.LogFunctionStartDebug("LogValue");
105  lvLsReturn = this.GetValue();
106  bOK = true;
107  }
108  finally
109  {
110  if (bOK)
111  {
112  MyLogger.LogFunctionEndDebug(lvLsReturn);
113  }
114  else
115  {
116  MyLogger.LogFunctionEndDebug();
117  }
118  }
119 
120  return lvLsReturn;
121  }
122 
137  public override List<string> MemorizeValue()
138  {
139  List<string> lvLsReturn = new List<string>();
140  bool bOK = false;
141 
142  try
143  {
144  MyLogger.LogFunctionStartDebug("Memorize");
145  lvLsReturn = this.GetValue();
146  bOK = true;
147  }
148  finally
149  {
150  if (bOK)
151  {
152  MyLogger.LogFunctionEndDebug(lvLsReturn);
153  }
154  else
155  {
156  MyLogger.LogFunctionEndDebug();
157  }
158  }
159 
160  return lvLsReturn;
161  }
162 
174  public override List<string> VerifyValue(List<string> fplsExpectedValue)
175  {
176  List<string> lvLsReturn = new List<string>();
177  bool bOK = false;
178 
179  try
180  {
181  MyLogger.LogFunctionStartDebug("Memorize", "fplsExpectedValue", fplsExpectedValue[0]);
182 
183  // GetValue als delegaten definieren
184  OKW_Wait4Value.ListStringCallBack myCallBack = this.GetValue;
185 
186  // Nun mit dem erwarteten Sollwert und GetValue ggf. auf den Wert Warten.
187  lvLsReturn = MyWait4Value.Wait4Value(fplsExpectedValue, myCallBack);
188 
189  bOK = true;
190  }
191  finally
192  {
193  if (bOK)
194  {
195  MyLogger.LogFunctionEndDebug(lvLsReturn);
196  }
197  else
198  {
199  MyLogger.LogFunctionEndDebug();
200  }
201  }
202 
203  return lvLsReturn;
204  }
205 
206  #endregion Methods
207  }
208 }
delegate List< string > ListStringCallBack()
Callback Muster string Variante.
override List< string > MemorizeValue()
Ermittelt den Wert, im Allgemeinen den textuellen Inhalt eines Objektes für das Schlüsselwort MerkeWe...
override List< string > LogValue()
Ermittelt den Wert des Objktes für das Schlüsselwort Loggewert.
override List< string > VerifyValue(List< string > fplsExpectedValue)
Ermittelt den textuellen Inhalt des markierten Textes für Prüfewert.
OKW_Wait4Value ist die zetrale Klasse, die für das Warten auf GUI eigenschaften zuständig ist...
override List< string > GetValue()
Holt den aktuellen Text aus dem Textfoil.
Description of OKWLocator.
Definition: OKWLocator.cs:52
Description of SeSimpleDataObjBase.
Definition: Core.cs:40