OpenKeyWord  Version: 426, Datum:
OK.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
43 {
44  using System;
45  using System.Collections.Generic;
46 
47  using OKW.Log;
48  using OKW.ANTLR4;
49 
60  public class OK : IOKW_State
61  {
62  #region Fields
63 
65  LogMessenger LM = null;
66  OKW_Docu MyOKWDocu = OKW_Docu.Instance;
67  bool UNITTEST = true;
68  Core _Kernel;
69 
70  #endregion Fields
71 
72  #region Constructors
73 
84  public OK(Core fp_OKW)
85  {
86  this._Kernel = fp_OKW;
87  this.LM = new LogMessenger(this.GetType().Name);
88  }
89 
90  #endregion Constructors
91 
92  #region Methods
93 
99  public void BeginTest(string fpsTestname)
100  {
101  Logger.Instance.LogFunctionStart("BeginTest",
102  "fpsTestname", fpsTestname);
103 
104  Logger.Instance.LogFunctionEnd();
105  }
106 
112  public void ClickOn(string fpsFunctionalname)
113  {
114  Logger.Instance.LogFunctionStart("ClickOn", "fpsFunctionalname", fpsFunctionalname);
115 
116  try {
117  CurrentObject.Instance.SetChildName(fpsFunctionalname);
118  CurrentObject.Instance.CallMethod("ClickOn");
119  } catch (Exception e) {
120  this.HandleException(e);
121  } finally {
122  Logger.Instance.LogFunctionEnd();
123  }
124  }
125 
131  public void ClickOn(string fpsFunctionalname, string fpsClickType)
132  {
133  Logger.Instance.LogFunctionStart("ClickOn", "fpsFunctionalname", fpsFunctionalname, "fpsClickType", fpsClickType);
134 
135  try {
136  CurrentObject.Instance.SetChildName(fpsFunctionalname);
137  CurrentObject.Instance.CallMethod("ClickOn_Clicktype", fpsClickType);
138  } catch (Exception e) {
139  this.HandleException(e);
140  } finally {
141  Logger.Instance.LogFunctionEnd();
142  }
143  }
144 
150  public void EndTest()
151  {
152  Logger.Instance.LogFunctionStart("EndTest");
153 
154  Logger.Instance.LogFunctionEnd();
155  }
156 
162  public void LogCaption(string fpsFunctionalname)
163  {
164  Logger.Instance.LogFunctionStart("LogCaption",
165  "fpsFunctionalname", fpsFunctionalname);
166 
167  try {
168  CurrentObject.Instance.SetChildName(fpsFunctionalname);
169  List<string> ActualValues = CurrentObject.Instance.CallMethodReturn_ListString("LogCaption");
170 
171  Logger.Instance.ResOpenList("Log... ");
172 
173  foreach (string Value in ActualValues) {
174  Logger.Instance.LogPrint(">>" + Value + "<<");
175  }
176 
177  Logger.Instance.ResCloseList();
178  } catch (Exception e) {
179  this.HandleException(e);
180  } finally {
181  Logger.Instance.LogFunctionEnd();
182  }
183  }
184 
190  public void LogExists(string fpsFunctionalname)
191  {
192  Logger.Instance.LogFunctionStart("LogExists",
193  "fpsFunctionalname", fpsFunctionalname);
194 
195  try {
196  CurrentObject.Instance.SetChildName(fpsFunctionalname);
197  bool lvbActual = CurrentObject.Instance.CallMethodReturn_Boolean("LogExists");
198  string lvsActual = OKW_Const.Instance.Boolean2YesNo(lvbActual);
199 
200  string lvsLM = this.LM.GetMessage("LogExists", "LogValue", lvsActual);
201 
202  Logger.Instance.LogPrint(lvsLM);
203  } catch (Exception e) {
204  this.HandleException(e);
205  } finally {
206  Logger.Instance.LogFunctionEnd();
207  }
208  }
209 
215  public void LogHasFocus(string fpsFunctionalname)
216  {
217  Logger.Instance.LogFunctionStart("LogHasFocus",
218  "fpsFunctionalname", fpsFunctionalname);
219 
220  try {
221  CurrentObject.Instance.SetChildName(fpsFunctionalname);
222  bool lvbActual = CurrentObject.Instance.CallMethodReturn_Boolean("LogHasFocus");
223  string lvsActual = OKW_Const.Instance.Boolean2YesNo(lvbActual);
224 
225  string lvsLM = this.LM.GetMessage("LogIsActive", "LogValue", lvsActual);
226 
227  Logger.Instance.LogPrint(lvsLM);
228  } catch (Exception e) {
229  this.HandleException(e);
230  } finally {
231  Logger.Instance.LogFunctionEnd();
232  }
233  }
234 
240  public void LogIsActive(string fpsFunctionalname)
241  {
242  Logger.Instance.LogFunctionStart("LogIsActive",
243  "fpsFunctionalname", fpsFunctionalname);
244 
245  try {
246  CurrentObject.Instance.SetChildName(fpsFunctionalname);
247  bool lvbActual = CurrentObject.Instance.CallMethodReturn_Boolean("LogIsActive");
248 
249  string lvsActual = OKW_Const.Instance.Boolean2YesNo(lvbActual);
250 
251  string lvsLM = this.LM.GetMessage("LogIsActive", "LogValue", lvsActual);
252 
253  Logger.Instance.LogPrint(lvsLM);
254  } catch (Exception e) {
255  this.HandleException(e);
256  } finally {
257  Logger.Instance.LogFunctionEnd();
258  }
259  }
260 
266  public void LogLabel(string fpsFunctionalname)
267  {
268  Logger.Instance.LogFunctionStart("LogLabel",
269  "fpsFunctionalname", fpsFunctionalname);
270 
271  try {
272  CurrentObject.Instance.SetChildName(fpsFunctionalname);
273  List<string> ActualValues = CurrentObject.Instance.CallMethodReturn_ListString("LogLabel");
274 
275  Logger.Instance.ResOpenList("Log... ");
276 
277  foreach (string Value in ActualValues) {
278  Logger.Instance.LogPrint(">>" + Value + "<<");
279  }
280 
281  Logger.Instance.ResCloseList();
282  } catch (Exception e) {
283  this.HandleException(e);
284  } finally {
285  Logger.Instance.LogFunctionEnd();
286  }
287  }
288 
294  public void LogSelected(string fpsFunctionalname)
295  {
296  Logger.Instance.LogFunctionStart(
297  "LogSelected",
298  "fpsFunctionalname",
299  fpsFunctionalname);
300 
301  try {
302  CurrentObject.Instance.SetChildName(fpsFunctionalname);
303  List<string> actualValues = CurrentObject.Instance.CallMethodReturn_ListString("LogSelected");
304 
305  string lvsLM = this.LM.GetMessage("LogSelected", "LogValue");
306 
307  Logger.Instance.LogPrint(lvsLM);
308 
309  Logger.Instance.ResOpenList(lvsLM);
310 
311  foreach (string Value in actualValues) {
312  Logger.Instance.LogPrint("'" + Value + "'");
313  }
314 
315  Logger.Instance.ResCloseList();
316  } catch (Exception e) {
317  this.HandleException(e);
318  } finally {
319  Logger.Instance.LogFunctionEnd();
320  }
321  }
322 
328  public void LogTablecellValue(string fpsFunctionalname, string fpsCol, string fpsRow)
329  {
330  Logger.Instance.LogFunctionStart(
331  "LogTablecellValue",
332  "fpsCol", fpsCol,
333  "fpsRow", fpsRow,
334  "fpsFunctionalname", fpsFunctionalname);
335 
336  try {
337  CurrentObject.Instance.SetChildName(fpsFunctionalname);
338  List<string> ActualValues = CurrentObject.Instance.CallMethodReturn_ListString("LogTablecellValue", fpsCol, fpsRow);
339 
340  Logger.Instance.ResOpenList("Log... ");
341 
342  foreach (string Value in ActualValues) {
343  Logger.Instance.LogPrint(">>" + Value + "<<");
344  }
345 
346  Logger.Instance.ResCloseList();
347  } catch (Exception e) {
348  this.HandleException(e);
349  } finally {
350  Logger.Instance.LogFunctionEnd();
351  }
352  }
353 
359  public void LogTooltip(string fpsFunctionalname)
360  {
361  Logger.Instance.LogFunctionStart("LogTooltip",
362  "fpsFunctionalname", fpsFunctionalname);
363 
364  try {
365  CurrentObject.Instance.SetChildName(fpsFunctionalname);
366  List<string> ActualValues = CurrentObject.Instance.CallMethodReturn_ListString("LogTooltip");
367 
368  Logger.Instance.ResOpenList("Log... ");
369 
370  foreach (string Value in ActualValues) {
371  Logger.Instance.LogPrint(">>" + Value + "<<");
372  }
373 
374  Logger.Instance.ResCloseList();
375  } catch (Exception e) {
376  this.HandleException(e);
377  } finally {
378  Logger.Instance.LogFunctionEnd();
379  }
380  }
381 
387  public void LogValue(string fpsFunctionalname)
388  {
389  Logger.Instance.LogFunctionStart("LogValue",
390  "fpsFunctionalname", fpsFunctionalname);
391 
392  try {
393  CurrentObject.Instance.SetChildName(fpsFunctionalname);
394  List<string> ActualValues = CurrentObject.Instance.CallMethodReturn_ListString("LogValue");
395 
396  Logger.Instance.ResOpenList("Log... ");
397 
398  foreach (string Value in ActualValues) {
399  Logger.Instance.LogPrint(">>" + Value + "<<");
400  }
401 
402  Logger.Instance.ResCloseList();
403  } catch (Exception e) {
404  this.HandleException(e);
405  } finally {
406  Logger.Instance.LogFunctionEnd();
407  }
408  }
409 
415  public void MemorizeCaption(string fpsFunctionalname, string fps_MemKeyName)
416  {
417  Logger.Instance.LogFunctionStart("MemorizeCaption",
418  "fpsFunctionalname", fpsFunctionalname,
419  "fps_MemKeyName", fps_MemKeyName);
420 
421  try {
422  CurrentObject.Instance.SetChildName(fpsFunctionalname);
423  List<string> ActualValues = CurrentObject.Instance.CallMethodReturn_ListString("MemorizeCaption");
424 
425  string lvsToMemorize = OKW_Const.Instance.ConcatSEP(ActualValues);
426 
427  OKW_Memorize.Instance.Set(fps_MemKeyName, lvsToMemorize);
428  } catch (Exception e) {
429  this.HandleException(e);
430  } finally {
431  Logger.Instance.LogFunctionEnd();
432  }
433  }
434 
440  public void MemorizeExists(string fpsFunctionalname, string fps_MemKeyName)
441  {
442  Logger.Instance.LogFunctionStart("MemorizeExists",
443  "fpsFunctionalname", fpsFunctionalname,
444  "fps_MemKeyName", fps_MemKeyName);
445 
446  try {
447  // Prüfen ob ignoriert werden muss...
448  if (fps_MemKeyName == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fps_MemKeyName == String.Empty) {
449  // Wenn der 1. Wert = IGNORE ist -> keine Weitere Aktion...
450  Logger.Instance.LogPrintDebug(this.LM.GetMessage("MemorizeExists", "Ignore"));
451  }
452  // Püfen ob YES/NO als Sollwert vorgegeben worden ist.
453  else
454  {
455  CurrentObject.Instance.SetChildName(fpsFunctionalname);
456  bool lvbActual = CurrentObject.Instance.CallMethodReturn_Boolean("MemorizeExists");
457 
458  string lvsActual = OKW_Const.Instance.Boolean2YesNo(lvbActual);
459 
460  OKW_Memorize.Instance.Set(fps_MemKeyName, lvsActual);
461  }
462  } catch (Exception e) {
463  this.HandleException(e);
464  } finally {
465  Logger.Instance.LogFunctionEnd();
466  }
467  }
468 
474  public void MemorizeHasFocus(string fpsFunctionalname, string fps_MemKeyName)
475  {
476  Logger.Instance.LogFunctionStart("MemorizeHasFocus",
477  "fpsFunctionalname", fpsFunctionalname,
478  "fps_MemKeyName", fps_MemKeyName);
479 
480  try {
481  // Prüfen ob ignoriert werden muss...
482  if (fps_MemKeyName == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fps_MemKeyName == String.Empty) {
483  // Wenn der 1. Wert = IGNORE ist -> keine Weitere Aktion...
484  Logger.Instance.LogPrintDebug(this.LM.GetMessage("MemorizeHasFocus", "Ignore"));
485  }
486  // Püfen ob YES/NO als Sollwert vorgegeben worden ist.
487  else
488  {
489  CurrentObject.Instance.SetChildName(fpsFunctionalname);
490  bool lvbActual = CurrentObject.Instance.CallMethodReturn_Boolean("MemorizeHasFocus");
491 
492  string lvsActual = OKW_Const.Instance.Boolean2YesNo(lvbActual);
493 
494  OKW_Memorize.Instance.Set(fps_MemKeyName, lvsActual);
495  }
496  } catch (Exception e) {
497  this.HandleException(e);
498  } finally {
499  Logger.Instance.LogFunctionEnd();
500  }
501  }
502 
508  public void MemorizeIsActive(string fpsFunctionalname, string fps_MemKeyName)
509  {
510  Logger.Instance.LogFunctionStart("MemorizeIsActive",
511  "fpsFunctionalname", fpsFunctionalname,
512  "fps_MemKeyName", fps_MemKeyName);
513 
514  try {
515  CurrentObject.Instance.SetChildName(fpsFunctionalname);
516  bool lvbActual = CurrentObject.Instance.CallMethodReturn_Boolean("MemorizeIsActive");
517 
518  string lvsActual = OKW_Const.Instance.Boolean2YesNo(lvbActual);
519 
520  OKW_Memorize.Instance.Set(fps_MemKeyName, lvsActual);
521  } catch (Exception e) {
522  this.HandleException(e);
523  } finally {
524  Logger.Instance.LogFunctionEnd();
525  }
526  }
527 
533  public void MemorizeLabel(string fpsFunctionalname, string fps_MemKeyName)
534  {
535  Logger.Instance.LogFunctionStart("MemorizeLabel",
536  "fpsFunctionalname", fpsFunctionalname,
537  "fps_MemKeyName", fps_MemKeyName);
538 
539  try {
540  CurrentObject.Instance.SetChildName(fpsFunctionalname);
541  List<string> ActualValues = CurrentObject.Instance.CallMethodReturn_ListString("MemorizeLabel");
542 
543  string lvsToMemorize = OKW_Const.Instance.ConcatSEP(ActualValues);
544 
545  OKW_Memorize.Instance.Set(fps_MemKeyName, lvsToMemorize);
546  } catch (Exception e) {
547  this.HandleException(e);
548  } finally {
549  Logger.Instance.LogFunctionEnd();
550  }
551  }
552 
558  public void MemorizeSelectedValue(string fpsFunctionalname, string fps_MemKeyName)
559  {
560  Logger.Instance.LogFunctionStart("MemorizeSelectedValue",
561  "fpsFunctionalname", fpsFunctionalname,
562  "fps_MemKeyName", fps_MemKeyName);
563 
564  try {
565  CurrentObject.Instance.SetChildName(fpsFunctionalname);
566  List<string> ActualValues = CurrentObject.Instance.CallMethodReturn_ListString("MemorizeSelectedValue");
567 
568  string lvsToMemorize = OKW_Const.Instance.ConcatSEP(ActualValues);
569 
570  OKW_Memorize.Instance.Set(fps_MemKeyName, lvsToMemorize);
571  } catch (Exception e) {
572  this.HandleException(e);
573  } finally {
574  Logger.Instance.LogFunctionEnd();
575  }
576  }
577 
583  public void MemorizeTablecellValue(string fpsFunctionalname, string fpsCol, string fpsRow, string fps_MemKeyName)
584  {
585  Logger.Instance.LogFunctionStart("MemorizeTablecellValue",
586  "fpsFunctionalname", fpsFunctionalname,
587  "fpsCol", fpsCol,
588  "fpsRow", fpsRow,
589  "fps_MemKeyName", fps_MemKeyName);
590 
591  try {
592  CurrentObject.Instance.SetChildName(fpsFunctionalname);
593  List<string> ActualValues = CurrentObject.Instance.CallMethodReturn_ListString("MemorizeTablecellValue", fpsCol, fpsRow);
594 
595  string lvsToMemorize = OKW_Const.Instance.ConcatSEP(ActualValues);
596 
597  OKW_Memorize.Instance.Set(fps_MemKeyName, lvsToMemorize);
598  } catch (Exception e) {
599  this.HandleException(e);
600  } finally {
601  Logger.Instance.LogFunctionEnd();
602  }
603  }
604 
610  public void MemorizeTooltip(string fpsFunctionalname, string fps_MemKeyName)
611  {
612  Logger.Instance.LogFunctionStart("MemorizeTooltip",
613  "fpsFunctionalname", fpsFunctionalname,
614  "fps_MemKeyName", fps_MemKeyName);
615 
616  try {
617  CurrentObject.Instance.SetChildName(fpsFunctionalname);
618  List<string> ActualValues = CurrentObject.Instance.CallMethodReturn_ListString("MemorizeTooltip");
619 
620  string lvsToMemorize = OKW_Const.Instance.ConcatSEP(ActualValues);
621 
622  OKW_Memorize.Instance.Set(fps_MemKeyName, lvsToMemorize);
623  } catch (Exception e) {
624  this.HandleException(e);
625  } finally {
626  Logger.Instance.LogFunctionEnd();
627  }
628  }
629 
635  public void MemorizeValue(string fpsFunctionalname, string fps_MemKeyName)
636  {
637  Logger.Instance.LogFunctionStart("MemorizeValue",
638  "fpsFunctionalname", fpsFunctionalname,
639  "fpsMemKeyName", fps_MemKeyName);
640 
641  try {
642  CurrentObject.Instance.SetChildName(fpsFunctionalname);
643  List<string> ActualValues = CurrentObject.Instance.CallMethodReturn_ListString("MemorizeValue");
644 
645  string lvsToMemorize = OKW_Const.Instance.ConcatSEP(ActualValues);
646 
647  OKW_Memorize.Instance.Set(fps_MemKeyName, lvsToMemorize);
648  } catch (Exception e) {
649  this.HandleException(e);
650  } finally {
651  Logger.Instance.LogFunctionEnd();
652  }
653  }
654 
660  public void Select(string fpsFunctionalname, string fpsValue)
661  {
662  Logger.Instance.LogFunctionStart("Select",
663  "fpsFunctionalname", fpsFunctionalname,
664  "fpsValue", fpsValue);
665  try {
666  // Prüfen ob ignoriert werden muss...
667  if (fpsValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsValue == String.Empty) {
668  // Wenn der 1. Wert = IGNORE ist -> Abbrechen...
669  // \todo TODO: Meldung sprachabhägig auslagern!
670  Logger.Instance.LogPrintDebug("Ignore...");
671  } else {
672  // Sonst Methode des Objektes aufrufen....
673  List<string> lvlsValue = OKW_Const.Instance.SplitSEP(fpsValue);
674 
675  lvlsValue = MyParser.ParseMe(lvlsValue);
676 
677  CurrentObject.Instance.SetChildName(fpsFunctionalname);
678  CurrentObject.Instance.CallMethod("Select", lvlsValue);
679  }
680  } catch (Exception e) {
681  this.HandleException(e);
682  } finally {
683  Logger.Instance.LogFunctionEnd();
684  }
685 
686  return;
687  }
688 
694  public void Select(string fpsFunctionalname, string fpsValue, string fpsClickType)
695  {
696  Logger.Instance.LogFunctionStart("Select",
697  "fpsFunctionalname", fpsFunctionalname,
698  "fpsValue", fpsValue,
699  "fpsClickType", fpsClickType);
700  try {
701  // Prüfen ob ignoriert werden muss...
702  if (fpsValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsValue == String.Empty) {
703  // Wenn der 1. Wert = IGNORE ist -> Abbrechen...
704  // \todo TODO: Meldung sprachabhägig auslagern!
705  Logger.Instance.LogPrintDebug("Ignore...");
706  } else {
707  List<string> lvlsValue = OKW_Const.Instance.SplitSEP(fpsValue);
708 
709  lvlsValue = MyParser.ParseMe(lvlsValue);
710 
711  CurrentObject.Instance.SetChildName(fpsFunctionalname);
712 
713  // TODO: Select - Sprachabhängigkeit von KlickType einbauen...
714  CurrentObject.Instance.CallMethod("Select_Clicktype", lvlsValue, fpsClickType);
715  }
716  } catch (Exception e) {
717  this.HandleException(e);
718  } finally {
719  Logger.Instance.LogFunctionEnd();
720  }
721  }
722 
728  public void SelectMenu(string fpsFunctionalname)
729  {
730  Logger.Instance.LogFunctionStart("SelectMenu",
731  "fpsFunctionalname", fpsFunctionalname);
732 
733  try {
734  CurrentObject.Instance.SetChildName(fpsFunctionalname);
735  CurrentObject.Instance.CallMethod("SelectMenu");
736  } catch (Exception e) {
737  this.HandleException(e);
738  } finally {
739  Logger.Instance.LogFunctionEnd();
740  }
741  }
742 
748  public void SelectMenu(string fpsFunctionalname, string fpsValue)
749  {
750  Logger.Instance.LogFunctionStart("SelectMenu",
751  "fpsFunctionalname", fpsFunctionalname,
752  "fpsValue", fpsValue);
753 
754  List<string> lvlsValue = OKW_Const.Instance.SplitSEP(fpsValue);
755 
756  try {
757  CurrentObject.Instance.SetChildName(fpsFunctionalname);
758  CurrentObject.Instance.CallMethod("SelectMenu_Value", lvlsValue);
759  } catch (Exception e) {
760  this.HandleException(e);
761  } finally {
762  Logger.Instance.LogFunctionEnd();
763  }
764  }
765 
771  public void SelectTablecell(string fpsFunctionalname, string fpsCol, string fpsRow)
772  {
773  Logger.Instance.LogFunctionStart("SelectTablecell",
774  "fpsFunctionalname", fpsFunctionalname,
775  "fpsCol", fpsCol,
776  "fpsRow", fpsRow);
777 
779 
780  try {
781  CurrentObject.Instance.SetChildName(fpsFunctionalname);
782  CurrentObject.Instance.CallMethod("SelectTablecell", fpsCol, fpsRow);
783  } catch (Exception e) {
784  this.HandleException(e);
785  } finally {
786  Logger.Instance.LogFunctionEnd();
787  }
788  }
789 
795  public void SelectTablecell(string fpsFunctionalname, string fpsCol, string fpsRow, string fpsClickType)
796  {
797  Logger.Instance.LogFunctionStart(
798  "SelectTablecell",
799  "fpsFunctionalname",
800  fpsFunctionalname,
801  "fpsCol",
802  fpsCol,
803  "fpsRow",
804  fpsRow,
805  "fpsClickType",
806  fpsClickType);
807 
808  try {
809  CurrentObject.Instance.SetChildName(fpsFunctionalname);
810  CurrentObject.Instance.CallMethod("SelectTablecell_Clicktype", fpsCol, fpsRow, fpsClickType);
811  } catch (Exception e) {
812  this.HandleException(e);
813  } finally {
814  Logger.Instance.LogFunctionEnd();
815  }
816  }
817 
823  public void SelectWindow(string fpsFunctionalname)
824  {
825  Logger.Instance.LogFunctionStart("SelectWindow",
826  "fpsFunctionalname", fpsFunctionalname);
827 
828  try {
829  CurrentObject.Instance.SetWindowName(fpsFunctionalname);
830  CurrentObject.Instance.CallMethod("SelectWindow");
831  } finally {
832  Logger.Instance.LogFunctionEnd();
833  }
834 
835  return;
836  }
837 
843  public void Sequence(string fpsObjectName, string fpsSequenceName, string SEQ_ID)
844  {
845  Logger.Instance.LogFunctionStart("Sequence",
846  "fpsObjectName", fpsObjectName,
847  "fpsSequenceName", fpsSequenceName,
848  "SEQ_ID", SEQ_ID);
849 
850  try {
851  // Prüfen ob ignoriert werden muss...
852  if (SEQ_ID == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || SEQ_ID == String.Empty) {
853  // Wenn der 1. Wert = IGNORE ist -> Abbrechen...
854  // \todo TODO: Meldung sprachabhägig auslagern!
855  Logger.Instance.LogPrintDebug("Ignore...");
856  } else {
857  CurrentObject.Instance.SetWindowName(fpsObjectName);
858  CurrentObject.Instance.CallMethod(fpsSequenceName, SEQ_ID);
859  }
860  } catch (Exception e) {
861  this.HandleException(e);
862  } finally {
863  Logger.Instance.LogFunctionEnd();
864  }
865  }
866 
872  public void SetFocus(string fpsFunctionalname)
873  {
874  Logger.Instance.LogFunctionStart("SetFocus",
875  "fpsFunctionalname", fpsFunctionalname);
876 
877  try {
878  CurrentObject.Instance.SetChildName(fpsFunctionalname);
879  CurrentObject.Instance.CallMethod("SetFocus");
880  } catch (Exception e) {
881  this.HandleException(e);
882  } finally {
883  Logger.Instance.LogFunctionEnd();
884  }
885  }
886 
892  public void SetLanguage(string Language)
893  {
894  this.AL.Language = Language;
895  }
896 
902  public void SetValue(string fpsFunctionalname, string fpsValue)
903  {
904  Logger.Instance.LogFunctionStart("SetValue",
905  "fpsFunctionalname", fpsFunctionalname);
906 
907  List<string> lvlsValue;
908 
909  try {
910  // Prüfen ob ignoriert werden muss...
911  if (fpsValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsValue == String.Empty) {
912  // Wenn der 1. Wert = IGNORE ist -> keine weitere Aktion...
913  Logger.Instance.LogPrint(this.LM.GetMessage("SetValue", "Ignore"));
914  } else {
915  lvlsValue = OKW_Const.Instance.SplitSEP(fpsValue);
916 
917  lvlsValue = MyParser.ParseMe(lvlsValue);
918 
919  CurrentObject.Instance.SetChildName(fpsFunctionalname);
920  CurrentObject.Instance.CallMethod("SetValue", lvlsValue);
921  }
922  } catch (Exception e) {
923  this.HandleException(e);
924  } finally {
925  Logger.Instance.LogFunctionEnd();
926  }
927  }
928 
934  public void StartApp(string fps_ApplikationName)
935  {
936  Logger.Instance.LogFunctionStart("StartApp",
937  "fps_ApplikationName", fps_ApplikationName);
938 
939  try {
940  CurrentObject.Instance.SetWindowName(fps_ApplikationName);
941  CurrentObject.Instance.CallMethod("StartApp");
942  } catch (Exception e) {
943  this.HandleException(e);
944  } finally {
945  Logger.Instance.LogFunctionEnd();
946  }
947  }
948 
954  public void StopApp(string fps_ApplikationName)
955  {
956  Logger.Instance.LogFunctionStart("StopApp",
957  "fps_ApplikationName", fps_ApplikationName);
958 
959  try {
960  CurrentObject.Instance.SetWindowName(fps_ApplikationName);
961  CurrentObject.Instance.CallMethod("StopApp");
962  } catch (Exception e) {
963  this.HandleException(e);
964  } finally {
965  Logger.Instance.LogFunctionEnd();
966  }
967  }
968 
974  public void TypeKey(string fpsFunctionalname, string fpsValue)
975  {
976  Logger.Instance.LogFunctionStart("TypeKey",
977  "fpsFunctionalname", fpsFunctionalname,
978  "fpsValue", fpsValue);
979 
980  List<string> lvlsValue;
981 
982  try {
983  // Prüfen ob ignoriert werden muss...
984  if (fpsValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsValue == String.Empty) {
985  // Wenn der 1. Wert = IGNORE ist -> keine weitere Aktion...
986  Logger.Instance.LogPrint(this.LM.GetMessage("TypeKey", "Ignore"));
987  } else {
988  lvlsValue = OKW_Const.Instance.SplitSEP(fpsValue);
989 
990  lvlsValue = MyParser.ParseMe(lvlsValue);
991 
992  CurrentObject.Instance.SetChildName(fpsFunctionalname);
993  CurrentObject.Instance.CallMethod("TypeKey", lvlsValue);
994  }
995  } catch (Exception e) {
996  this.HandleException(e);
997  } finally {
998  Logger.Instance.LogFunctionEnd();
999  }
1000  }
1001 
1007  public void TypeKeyTablecell(string fpsFunctionalname, string fpsCol, string fpsRow, string fpsValue)
1008  {
1009  Logger.Instance.LogFunctionStart("TypeKeyTablecell",
1010  "fpsFunctionalname", fpsFunctionalname,
1011  "fpsColl", fpsCol,
1012  "fpsRow", fpsRow,
1013  "fpsValue", fpsValue);
1014 
1015  List<string> lvlsValue;
1016 
1017  try {
1018  // Prüfen ob ignoriert werden muss...
1019  if (fpsValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsValue == String.Empty) {
1020  // Wenn der 1. Wert = IGNORE ist -> keine weitere Aktion...
1021  Logger.Instance.LogPrint(this.LM.GetMessage("TypeKeyTablecell", "Ignore"));
1022  } else {
1023  // Werte in fpsValue separieren
1024  lvlsValue = OKW_Const.Instance.SplitSEP(fpsValue);
1025 
1026  lvlsValue = MyParser.ParseMe(lvlsValue);
1027 
1028  CurrentObject.Instance.SetChildName(fpsFunctionalname);
1029  CurrentObject.Instance.CallMethod("TypeKeyTablecell", fpsCol, fpsRow, lvlsValue);
1030  }
1031  } catch (Exception e) {
1032  this.HandleException(e);
1033  } finally {
1034  Logger.Instance.LogFunctionEnd();
1035  }
1036  }
1037 
1043  public void TypeKeyWindow(string fpsFunctionalname, string fpsValue)
1044  {
1045  Logger.Instance.LogFunctionStart("TypeKeyWindow",
1046  "fpsFunctionalname", fpsFunctionalname,
1047  "fpsValue", fpsValue);
1048 
1049  try {
1050  // Prüfen ob ignoriert werden muss...
1051  if (fpsValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsValue == String.Empty) {
1052  // Wenn der 1. Wert = IGNORE ist -> keine weitere Aktion...
1053  Logger.Instance.LogPrint(this.LM.GetMessage("TypeKeyWindow", "Ignore"));
1054  } else {
1055  List<string> lvlsValue = OKW_Const.Instance.SplitSEP(fpsValue);
1056  lvlsValue = MyParser.ParseMe(lvlsValue);
1057 
1058  CurrentObject.Instance.SetWindowName(fpsFunctionalname);
1059  CurrentObject.Instance.CallMethod("TypeKey", lvlsValue);
1060  }
1061  } catch (Exception e) {
1062  this.HandleException(e);
1063  } finally {
1064  Logger.Instance.LogFunctionEnd();
1065  }
1066  }
1067 
1073  public void VerifyCaption(string fpsFunctionalname, string fpsExpectedValue)
1074  {
1075  Logger.Instance.LogFunctionStart("VerifyCaption",
1076  "fpsFunctionalname", fpsFunctionalname,
1077  "fpsExpectedValue", fpsExpectedValue);
1078 
1079  try {
1080  // Prüfen ob ignoriert werden muss...
1081  if (fpsExpectedValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsExpectedValue == String.Empty) {
1082  // Wenn der 1. Wert = IGNORE ist -> keine weitere Aktion...
1083  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyCaption", "Ignore"));
1084  } else {
1085  // Split giveneExpected Value
1086  List<string> lvlsExpected = OKW_Const.Instance.SplitSEP(fpsExpectedValue);
1087 
1088  // Get the actuel value from object
1089  CurrentObject.Instance.SetChildName(fpsFunctionalname);
1090  List<string> Actual = CurrentObject.Instance.CallMethodReturn_ListString("VerifyCaption", lvlsExpected);
1091 
1092  // Verify:
1093  // 1. are the length of the lists equal?
1094  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyCaption", "VerifyListCount"));
1095  Logger.Instance.LogVerify(Actual.Count.ToString(), lvlsExpected.Count.ToString());
1096 
1097  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyCaption", "VerifyValues"));
1098 
1099  for (int i = 0; i < Actual.Count; i++) {
1100  Logger.Instance.LogVerify(Actual[i], lvlsExpected[i]);
1101  }
1102  }
1103  } catch (Exception e) {
1104  this.HandleException(e);
1105  } finally {
1106  Logger.Instance.LogFunctionEnd();
1107  }
1108  }
1109 
1115  public void VerifyExists(string fpsFunctionalname, string fpsExpectedValue)
1116  {
1117  Logger.Instance.LogFunctionStart("VerifyExists",
1118  "fpsFunctionalname", fpsFunctionalname,
1119  "fpsExpectedValue", fpsExpectedValue);
1120 
1121  try {
1122  //Hier sind nur drei werte erlaubt: YES/NO/IGNORE
1123 
1124  // Prüfen ob ignoriert werden muss...
1125  if (fpsExpectedValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsExpectedValue == String.Empty) {
1126  // Wenn der 1. Wert = IGNORE ist -> keine weitere Aktion...
1127  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyExists", "Ignore"));
1128  }
1129  // Püfen ob YES/NO als Sollwert vorgegeben worden ist.
1130  else if (fpsExpectedValue == OKW_Const.Instance.GetConst4Internalname("YES") || fpsExpectedValue == OKW_Const.Instance.GetConst4Internalname("NO")) {
1131  // Sprachabhängiges YES/NO nach bool transformieren
1132  bool lvsbExpectedValue = OKW_Const.Instance.YesNo2Boolean(fpsExpectedValue);
1133 
1134  CurrentObject.Instance.SetChildName(fpsFunctionalname);
1135  bool lvbActual = CurrentObject.Instance.CallMethodReturn_BooleanPb("VerifyExists", lvsbExpectedValue);
1136 
1137  string lvsActual = OKW_Const.Instance.Boolean2YesNo(lvbActual);
1138 
1139  // Soll/Ist Vergleich...
1140  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyExists", "VerifyValue"));
1141 
1142  // LANGUAGE: Prüfen: Sprachabhängigen string-vergleich durchführen...
1143  Logger.Instance.LogVerify(lvsActual, fpsExpectedValue);
1144  }
1145  // Beide Bedingungen sind nicht erfüllt -> Exception da keinanderer Wert hier erlaubt ist.
1146  else {
1147  string ExceptionLog = this.LM.GetMessage("VerifyExists", "OKWNotAllowedValueException", fpsExpectedValue);
1148  throw new OKWNotAllowedValueException(ExceptionLog);
1149  }
1150  } catch (Exception e) {
1151  this.HandleException(e);
1152  } finally {
1153  Logger.Instance.LogFunctionEnd();
1154  }
1155  }
1156 
1162  public void VerifyHasFocus(string fpsFunctionalname, string fpsExpectedValue)
1163  {
1164  Logger.Instance.LogFunctionStart("VerifyHasFocus",
1165  "fpsFunctionalname", fpsFunctionalname,
1166  "fpsExpectedValue", fpsExpectedValue);
1167 
1168  try {
1169  // Prüfen ob ignoriert werden muss...
1170  if (fpsExpectedValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsExpectedValue == String.Empty) {
1171  // Wenn der 1. Wert = IGNORE ist -> keine weitere Aktion...
1172  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyHasFocus", "Ignore"));
1173  }
1174  // Püfen ob YES/NO als Sollwert vorgegeben worden ist.
1175  else if (fpsExpectedValue == OKW_Const.Instance.GetConst4Internalname("YES") || fpsExpectedValue == OKW_Const.Instance.GetConst4Internalname("NO")) {
1176  // Sprachabhängiges YES/NO nach bool transformieren
1177  bool lvsbExpectedValue = OKW_Const.Instance.YesNo2Boolean(fpsExpectedValue);
1178 
1179  CurrentObject.Instance.SetChildName(fpsFunctionalname);
1180  bool lvbActual = CurrentObject.Instance.CallMethodReturn_BooleanPb("VerifyHasFocus", lvsbExpectedValue);
1181 
1182  string lvsActual = OKW_Const.Instance.Boolean2YesNo(lvbActual);
1183 
1184  // Soll/Ist Vergleich...
1185  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyHasFocus", "VerifyValue"));
1186  Logger.Instance.LogVerify(lvsActual, fpsExpectedValue);
1187 
1188  // \todo LANGUAGE: Püfen aws dieser eintrag soll: Sprachabhängigen string-vergleich durchführen...
1189  }
1190  // Beide Bedingungen sind nicht erfüllt -> Exception da keinanderer Wert hier erlaubt ist.
1191  else {
1192  string ExceptionLog = this.LM.GetMessage("VerifyExists", "OKWNotAllowedValueException", fpsExpectedValue);
1193  throw new OKWNotAllowedValueException(ExceptionLog);
1194  }
1195  } catch (Exception e) {
1196  this.HandleException(e);
1197  } finally {
1198  Logger.Instance.LogFunctionEnd();
1199  }
1200  }
1201 
1207  public void VerifyIsActive(string fpsFunctionalname, string fpsExpectedValue)
1208  {
1209  Logger.Instance.LogFunctionStart("VerifyIsActive",
1210  "fpsFunctionalname", fpsFunctionalname,
1211  "fpsExpectedValue", fpsExpectedValue);
1212  try {
1213  // Prüfen ob ignoriert werden muss...
1214  if (fpsExpectedValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsExpectedValue == String.Empty) {
1215  // Wenn der 1. Wert = IGNORE ist -> keine weitere Aktion...
1216  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyIsActive", "Ignore"));
1217  }
1218  // Püfen ob YES/NO als Sollwert vorgegeben worden ist.
1219  else if (fpsExpectedValue == OKW_Const.Instance.GetConst4Internalname("YES") || fpsExpectedValue == OKW_Const.Instance.GetConst4Internalname("NO")) {
1220  CurrentObject.Instance.SetChildName(fpsFunctionalname);
1221 
1222  // Erwarteten Wert(YES/NO, Sprachabhänging) nach bool wandelen
1223  bool lvbExpectedValue = OKW_Const.Instance.YesNo2Boolean(fpsExpectedValue);
1224 
1225  // Aktuellen Wert holen...
1226  bool lvbActual = CurrentObject.Instance.CallMethodReturn_BooleanPb("VerifyIsActive", lvbExpectedValue);
1227 
1228  // Aktuellen Wert nach YES/NO, Sprachabhänging, wandel...
1229  string lvsActual = OKW_Const.Instance.Boolean2YesNo(lvbActual);
1230 
1231  // Soll/Ist Vergleich...
1232  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyIsActive", "VerifyValue"));
1233  Logger.Instance.LogVerify(lvsActual, fpsExpectedValue);
1234  }
1235  // Beide Bedingungen sind nicht erfüllt -> Exception da kein anderer Wert hier erlaubt ist.
1236  else {
1237  string ExceptionLog = this.LM.GetMessage("VerifyExists", "OKWNotAllowedValueException", fpsExpectedValue);
1238  throw new OKWNotAllowedValueException(ExceptionLog);
1239  }
1240  } catch (Exception e) {
1241  this.HandleException(e);
1242  } finally {
1243  Logger.Instance.LogFunctionEnd();
1244  }
1245  }
1246 
1252  public void VerifyLabel(string fpsFunctionalname, string fpsExpectedValue)
1253  {
1254  Logger.Instance.LogFunctionStart("VerifyLabel",
1255  "fpsFunctionalname", fpsFunctionalname,
1256  "fpsExpected", fpsExpectedValue);
1257 
1258  try {
1259  // Prüfen ob ignoriert werden muss...
1260  if (fpsExpectedValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsExpectedValue == String.Empty) {
1261  // Wenn der 1. Wert = IGNORE ist -> keine weitere Aktion...
1262  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyLabel", "Ignore"));
1263  } else {
1264  // Split giveneExpected Value
1265  List<string> lvlsExpected = OKW_Const.Instance.SplitSEP(fpsExpectedValue);
1266 
1267  // Get the actuel value from object
1268  CurrentObject.Instance.SetChildName(fpsFunctionalname);
1269  List<string> Actual = CurrentObject.Instance.CallMethodReturn_ListString("VerifyLabel", lvlsExpected);
1270 
1271  // Verify:
1272  // 1. are the List length equal?
1273  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyLabel", "VerifyListCount"));
1274  Logger.Instance.LogVerify(Actual.Count.ToString(), lvlsExpected.Count.ToString());
1275 
1276  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyLabel", "VerifyValues"));
1277 
1278  for (int i = 0; i < Actual.Count; i++) {
1279  Logger.Instance.LogVerify(Actual[i], lvlsExpected[i]);
1280  }
1281  }
1282  } catch (Exception e) {
1283  this.HandleException(e);
1284  } finally {
1285  Logger.Instance.LogFunctionEnd();
1286  }
1287  }
1288 
1294  public void VerifySelectedValue(string fpsFunctionalname, string fpsExpectedValue)
1295  {
1296  Logger.Instance.LogFunctionStart("VerifySelectedValue",
1297  "fpsFunctionalname", fpsFunctionalname,
1298  "fpsExpected", fpsExpectedValue);
1299 
1300  try {
1301  // Prüfen ob ignoriert werden muss...
1302  if (fpsExpectedValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsExpectedValue == String.Empty) {
1303  // Wenn der 1. Wert = IGNORE ist -> keine weitere Aktion...
1304  Logger.Instance.LogPrint(this.LM.GetMessage("VerifySelectedValue", "Ignore"));
1305  } else {
1306  // Split giveneExpected Value
1307  List<string> lvlsExpected = OKW_Const.Instance.SplitSEP(fpsExpectedValue);
1308 
1309  // Get the actuel value from object
1310  CurrentObject.Instance.SetChildName(fpsFunctionalname);
1311  List<string> Actual = CurrentObject.Instance.CallMethodReturn_ListString("VerifySelectedValue", lvlsExpected);
1312 
1313  // Verify:
1314  // 1. are the List length equal?
1315  Logger.Instance.LogPrint(this.LM.GetMessage("VerifySelectedValue", "VerifyListCount"));
1316  Logger.Instance.LogVerify(Actual.Count.ToString(), lvlsExpected.Count.ToString());
1317 
1318  Logger.Instance.LogPrint(this.LM.GetMessage("VerifySelectedValue", "VerifyValues"));
1319 
1320  for (int i = 0; i < Actual.Count; i++) {
1321  Logger.Instance.LogVerify(Actual[i], lvlsExpected[i]);
1322  }
1323  }
1324  } catch (Exception e) {
1325  this.HandleException(e);
1326  } finally {
1327  Logger.Instance.LogFunctionEnd();
1328  }
1329  }
1330 
1336  public void VerifyTablecellValue(string fpsFunctionalname, string fpsCol, string fpsRow, string fpsExpectedValue)
1337  {
1338  Logger.Instance.LogFunctionStart("VerifyTablecellValue",
1339  "fpsFunctionalname", fpsFunctionalname,
1340  "fpsCol", fpsCol,
1341  "fpsRow", fpsRow,
1342  "fpsExpected", fpsExpectedValue);
1343 
1344  try {
1345  // Prüfen ob ignoriert werden muss...
1346  if (fpsExpectedValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsExpectedValue == String.Empty) {
1347  // Wenn der 1. Wert = IGNORE ist -> keine weitere Aktion...
1348  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyTablecellValue", "Ignore"));
1349  } else {
1350  // Split giveneExpected Value
1351  List<string> lvlsExpected = OKW_Const.Instance.SplitSEP(fpsExpectedValue);
1352 
1353  CurrentObject.Instance.SetChildName(fpsFunctionalname);
1354  List<string> Actual = CurrentObject.Instance.CallMethodReturn_ListString("VerifyTablecellValue", fpsCol, fpsRow, lvlsExpected);
1355 
1356  // Verify:
1357  // 1. are the List length equal?
1358  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyTablecellValue", "VerifyListCount"));
1359  Logger.Instance.LogVerify(Actual.Count.ToString(), lvlsExpected.Count.ToString());
1360 
1361  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyTablecellValue", "VerifyValues"));
1362 
1363  for (int i = 0; i < Actual.Count; i++) {
1364  Logger.Instance.LogVerify(Actual[i], lvlsExpected[i]);
1365  }
1366  }
1367  } catch (Exception e) {
1368  this.HandleException(e);
1369  } finally {
1370  Logger.Instance.LogFunctionEnd();
1371  }
1372  }
1373 
1379  public void VerifyTooltip(string fpsFunctionalname, string fpsExpectedValue)
1380  {
1381  Logger.Instance.LogFunctionStart("VerifyTooltip",
1382  "fpsFunctionalname", fpsFunctionalname,
1383  "fpsExpected", fpsExpectedValue);
1384 
1385  try {
1386  // Prüfen ob ignoriert werden muss...
1387  if (fpsExpectedValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsExpectedValue == String.Empty) {
1388  // Wenn der 1. Wert = IGNORE ist -> keine weitere Aktion...
1389  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyTooltip", "Ignore"));
1390  } else {
1391  // Split giveneExpected Value
1392  List<string> lvlsExpected = OKW_Const.Instance.SplitSEP(fpsExpectedValue);
1393 
1394  // Get the actuel value from object
1395  CurrentObject.Instance.SetChildName(fpsFunctionalname);
1396  List<string> Actual = CurrentObject.Instance.CallMethodReturn_ListString("VerifyTooltip", lvlsExpected);
1397 
1398  // Verify:
1399  // 1. are the List length equal?
1400  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyTooltip", "VerifyListCount"));
1401  Logger.Instance.LogVerify(Actual.Count.ToString(), lvlsExpected.Count.ToString());
1402 
1403  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyTooltip", "VerifyValues"));
1404 
1405  for (int i = 0; i < Actual.Count; i++) {
1406  Logger.Instance.LogVerify(Actual[i], lvlsExpected[i]);
1407  }
1408  }
1409  } catch (Exception e) {
1410  this.HandleException(e);
1411  } finally {
1412  Logger.Instance.LogFunctionEnd();
1413  }
1414  }
1415 
1421  public void VerifyValue(string fpsFunctionalname, string fpsExpectedValue)
1422  {
1423  Logger.Instance.LogFunctionStart("VerifyValue",
1424  "fpsFunctionalname", fpsFunctionalname,
1425  "fpsExpected", fpsExpectedValue);
1426 
1427  try {
1428  // Prüfen ob ignoriert werden muss...
1429  if (fpsExpectedValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsExpectedValue == String.Empty) {
1430  // Wenn der 1. Wert = IGNORE ist -> keine weitere Aktion...
1431  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyValue", "Ignore"));
1432  } else {
1433  // Split giveneExpected Value
1434  List<string> lvlsExpected = OKW_Const.Instance.SplitSEP(fpsExpectedValue);
1435 
1436  CurrentObject.Instance.SetChildName(fpsFunctionalname);
1437  List<string> Actual = CurrentObject.Instance.CallMethodReturn_ListString("VerifyValue", lvlsExpected);
1438 
1439  // Verify:
1440  // 1. are the List length equal?
1441  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyValue", "VerifyListCount"));
1442  Logger.Instance.LogVerify(Actual.Count.ToString(), lvlsExpected.Count.ToString());
1443 
1444  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyValue", "VerifyValues"));
1445 
1446  for (int i = 0; i < Actual.Count; i++) {
1447  Logger.Instance.LogVerify(Actual[i], lvlsExpected[i]);
1448  }
1449  }
1450  } catch (Exception e) {
1451  this.HandleException(e);
1452  } finally {
1453  Logger.Instance.LogFunctionEnd();
1454  }
1455  }
1456 
1472  private void HandleException(Exception e)
1473  {
1474  Logger.Instance.LogPrint("==========================================================================");
1475  Logger.Instance.LogException(string.Format("{0}", e.Message));
1476  Logger.Instance.LogPrint("--------");
1477 
1478  // Das ist nicht schön aber Notwendig. LogObjektData ist
1479  if (!e.GetType().IsAssignableFrom(typeof(OKWFrameObjectParentNotFoundException))) {
1480  CurrentObject.Instance.LogObjectData();
1481  }
1482 
1483  Logger.Instance.LogPrint("--------");
1484  Logger.Instance.LogPrint(" Stack:");
1485  Logger.Instance.LogException(string.Format("{0}", e.StackTrace));
1486 
1487  Logger.Instance.LogPrint("-------");
1488  Logger.Instance.LogPrint(" Source:");
1489  Logger.Instance.LogException(string.Format("{0}", e.Source));
1490 
1491  Logger.Instance.LogPrint("-------");
1492  Logger.Instance.LogPrint(" TargetSite:");
1493  Logger.Instance.LogException(string.Format("{0}", e.TargetSite));
1494 
1495  Logger.Instance.LogPrint("==========================================================================");
1496 
1497  // Change State to NOK
1498  this._Kernel.SetCurrentState(new NOK(this._Kernel));
1499 
1500  if (this.UNITTEST) {
1501  throw e;
1502  }
1503  }
1504 
1505  #region File_Methods
1506 
1508  public void FileDelete(string fpsPathAndFileName)
1509  {
1510  string lvsPathAndFileName = string.Empty;
1511 
1512  Logger.Instance.LogFunctionStart("FileDelete", "fpsPathAndFileName", fpsPathAndFileName);
1513  try
1514  {
1515  // Prüfen ob ignoriert werden muss...
1516  if (fpsPathAndFileName == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsPathAndFileName == String.Empty)
1517  {
1518  // Wenn der 1. Wert = IGNORE ist -> keine Weitere Aktion...
1519  Logger.Instance.LogPrintDebug(this.LM.GetMessage("FileDelete", "Ignore"));
1520  }
1521  // Püfen ob YES/NO als Sollwert vorgegeben worden ist.
1522  else
1523  {
1524  // 1. Parsen der Pfad-Eingabe
1525  lvsPathAndFileName = MyParser.ParseMe(fpsPathAndFileName);
1526  // 2. Konvertieren des Pfad separators.
1527  lvsPathAndFileName = OKW_FileHelper.ConvertDirectorySeperator(lvsPathAndFileName);
1528 
1529  string lsvLog = this.LM.GetMessage("FileDelete", "ResolvedPath", lvsPathAndFileName);
1530  Logger.Instance.LogPrint(lsvLog);
1531 
1532  // Basis-Funktion aufrufen...
1533  OKW_FileHelper.FilesDelete(lvsPathAndFileName);
1534  }
1535  }
1536  catch (Exception e)
1537  {
1538  HandleException(e);
1539  }
1540  finally
1541  {
1542  Logger.Instance.LogFunctionEnd();
1543  }
1544  }
1545 
1547  public void VerifyFileExists(string fpsPathAndFileName, string fpsExpectedValue)
1548  {
1549  string lvsPathAndFileName = string.Empty;
1550 
1551  Logger.Instance.LogFunctionStart("VerifyFileExist",
1552  "fpsPathAndFileName", fpsPathAndFileName,
1553  "fpsExpectedValue", fpsExpectedValue);
1554  try
1555  {
1556  // Prüfen ob ignoriert werden muss...
1557  if (fpsExpectedValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsExpectedValue == String.Empty) {
1558  // Wenn der 1. Wert = IGNORE ist -> keine Weitere Aktion...
1559  Logger.Instance.LogPrintDebug(this.LM.GetMessage("VerifyFileExists", "Ignore"));
1560  }
1561  // Püfen ob YES/NO als Sollwert vorgegeben worden ist.
1562  else if (fpsExpectedValue == OKW_Const.Instance.GetConst4Internalname("YES") || fpsExpectedValue == OKW_Const.Instance.GetConst4Internalname("NO"))
1563  {
1564  // Aktuellen Wert holen...
1565 
1566  // 1. Parsen der Pfad-Eingabe
1567  lvsPathAndFileName = MyParser.ParseMe(fpsPathAndFileName);
1568  // 2. Konvertieren des Pfad separators.
1569  lvsPathAndFileName = OKW_FileHelper.ConvertDirectorySeperator(lvsPathAndFileName);
1570 
1571  string lsvLog = this.LM.GetMessage("VerifyFileExists", "ResolvedPath", lvsPathAndFileName);
1572  Logger.Instance.LogPrint( lsvLog );
1573 
1574  // Basis-Funkton aufrufen...
1575  bool lvbActual = OKW_FileHelper.FileExist(lvsPathAndFileName);
1576 
1577  // Aktuellen Wert nach YES/NO, Sprachabhänging, wandel...
1578  string lvsActual = OKW_Const.Instance.Boolean2YesNo(lvbActual);
1579 
1580  // Soll/Ist Vergleich...
1581  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyIsActive", "VerifyValue"));
1582  Logger.Instance.LogVerify(lvsActual, fpsExpectedValue);
1583  }
1584  // Beide Bedingungen sind nicht erfüllt -> Exception da kein anderer Wert hier erlaubt ist.
1585  else
1586  {
1587  string ExceptionLog = LM.GetMessage("VerifyFileExists", "OKWNotAllowedValueException", fpsExpectedValue);
1588  throw new OKWNotAllowedValueException(ExceptionLog);
1589  }
1590  }
1591  catch (Exception e) {
1592  this.HandleException(e);
1593  }
1594  finally {
1595  Logger.Instance.LogFunctionEnd();
1596  }
1597  }
1598 
1600  public void VerifyDirectoryExists(string fpsPath, string fpsExpectedValue)
1601  {
1602  string lvsPath = string.Empty;
1603 
1604  Logger.Instance.LogFunctionStart("VerifyDirectoryExists",
1605  "fpsPath", fpsPath,
1606  "fpsExpectedValue", fpsExpectedValue);
1607  try
1608  {
1609  // Prüfen ob ignoriert werden muss...
1610  if (fpsExpectedValue == OKW_Const.Instance.GetOKWConst4Internalname("IGNORE") || fpsExpectedValue == String.Empty)
1611  {
1612  // Wenn der 1. Wert = IGNORE ist -> keine Weitere Aktion...
1613  Logger.Instance.LogPrintDebug(this.LM.GetMessage("VerifyDirectoryExists", "Ignore"));
1614  }
1615  // Püfen ob YES/NO als Sollwert vorgegeben worden ist.
1616  else if (fpsExpectedValue == OKW_Const.Instance.GetConst4Internalname("YES") || fpsExpectedValue == OKW_Const.Instance.GetConst4Internalname("NO"))
1617  {
1618  // Aktuellen Wert holen...
1619 
1620  // 1. Parsen der Pfad-Eingabe
1621  lvsPath = MyParser.ParseMe(fpsPath);
1622  // 2. Konvertieren des Pfad separators.
1623  lvsPath = OKW_FileHelper.ConvertDirectorySeperator(lvsPath);
1624 
1625  string lsvLog = this.LM.GetMessage("VerifyDirectoryExists", "ResolvedPath", lvsPath);
1626  Logger.Instance.LogPrint(lsvLog);
1627 
1628  // Basis-Funkton aufrufen...
1629  bool lvbActual = OKW_FileHelper.DirectoryExist(lvsPath);
1630 
1631  // Aktuellen Wert nach YES/NO, Sprachabhänging, wandel...
1632  string lvsActual = OKW_Const.Instance.Boolean2YesNo(lvbActual);
1633 
1634  // Soll/Ist Vergleich...
1635  Logger.Instance.LogPrint(this.LM.GetMessage("VerifyDirectoryExists", "VerifyValue"));
1636  Logger.Instance.LogVerify(lvsActual, fpsExpectedValue);
1637  }
1638  // Beide Bedingungen sind nicht erfüllt -> Exception da kein anderer Wert hier erlaubt ist.
1639  else
1640  {
1641  string ExceptionLog = LM.GetMessage("VerifyDirectoryExists", "OKWNotAllowedValueException", fpsExpectedValue);
1642  throw new OKWNotAllowedValueException(ExceptionLog);
1643  }
1644  }
1645  catch (Exception e)
1646  {
1647  this.HandleException(e);
1648  }
1649  finally
1650  {
1651  Logger.Instance.LogFunctionEnd();
1652  }
1653  }
1654 
1655  #endregion Methods
1656 
1657  #endregion Methods
1658  }
1659 }
string GetMessage(string MethodName, string TextKey)
Holt die Log-Meldung für MethodeNmae/Textkey ohne weitere Parameter.
Diese Klasse verwaltet das aktuelle GUI-Objekt.
void SelectTablecell(string fpsFunctionalname, string fpsCol, string fpsRow, string fpsClickType)
Wählt die gegebene Tabellenzelle aus.
Definition: OK.cs:795
void LogPrint(string fps_Message)
LogPrint Function: Prints the values of expressions to the results file.
Definition: Logger.cs:302
void MemorizeHasFocus(string fpsFunctionalname, string fps_MemKeyName)
Keine Beschreibung zu "MemorizeHasFocus" verfügbar.
Definition: OK.cs:474
void VerifyExists(string fpsFunctionalname, string fpsExpectedValue)
Prüft, ob das gegebene Objekt existiert. Beispiel 1: Prüfe, ob das Objekt "MeinObjekt" existiert: ...
Definition: OK.cs:1115
void ClickOn(string fpsFunctionalname, string fpsClickType)
Klickt auf das gegebene Objekt.
Definition: OK.cs:131
void HandleException(Exception e)
Zentrale Exception-Behandlung.
Definition: OK.cs:1472
void ResOpenList(string fps_Name)
Creates a new hierarchical level in the results file. Use ResOpenList to start a new hierarchical lev...
Definition: Logger.cs:426
void VerifySelectedValue(string fpsFunctionalname, string fpsExpectedValue)
Vergleicht den ausgewählten Wert des gegebenen Listenobjekts mit dem erwarteten Wert.
Definition: OK.cs:1294
void VerifyHasFocus(string fpsFunctionalname, string fpsExpectedValue)
Vergleicht den Fokus-Zustand des gegebenen Objekts mit dem erwarteten Wert.
Definition: OK.cs:1162
void SelectMenu(string fpsFunctionalname)
Wählt den gegebenen Menüeintrag aus.
Definition: OK.cs:728
void TypeKeyTablecell(string fpsFunctionalname, string fpsCol, string fpsRow, string fpsValue)
Eingabe von Daten in eine gegebene Tabellenzelle über die Tastatur.
Definition: OK.cs:1007
void VerifyTooltip(string fpsFunctionalname, string fpsExpectedValue)
Keine Beschreibung zu "VerifyTooltip" verfügbar.
Definition: OK.cs:1379
void LogException(string fps_Message)
LogException Function: Logs a Script Exception to the results file.
Definition: Logger.cs:155
static string ConvertDirectorySeperator(string fpsPath)
Konvertiert selbständig.
void LogValue(string fpsFunctionalname)
Dokumentiert den Standartwert eines Objekts.
Definition: OK.cs:387
http://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste
Definition: OKWLanguage.cs:50
void LogIsActive(string fpsFunctionalname)
Dokumentiert den Status des gegebenen Objekts.
Definition: OK.cs:240
void LogExists(string fpsFunctionalname)
Protokolliert, ob das gegebene Objekt existiert.
Definition: OK.cs:190
void VerifyIsActive(string fpsFunctionalname, string fpsExpectedValue)
Vergleicht den Fokus-Status des gegebenen Objekts mit dem erwarteten Wert.
Definition: OK.cs:1207
static T Instance
Holt die einzige Instanz dieser Klasse.
bool YesNo2Boolean(string fpsYesOrNo)
Konvertiert sprachabhängig Ja/Nein zu einem boolean Wert (Wahr/Falsch).
Definition: OKW_Const.cs:900
static OKW_Const Instance
Holt die einzige Instanz dieser Klasse. Die Instanz dieser Klasse.
Definition: OKW_Const.cs:309
void MemorizeLabel(string fpsFunctionalname, string fps_MemKeyName)
Keine Beschreibung zu "MemorizeLabel" verfügbar.
Definition: OK.cs:533
void EndTest()
Beendet den Test, bzw. den Testfall.
Definition: OK.cs:150
void Select(string fpsFunctionalname, string fpsValue, string fpsClickType)
Auswahl aller Zeilen einer Liste/Tabelle, welche die gegebenen Daten enthalten.
Definition: OK.cs:694
static void FilesDelete(string fpsPaFiNa)
Löscht eine oder mehrere Dateien.
void StartApp(string fps_ApplikationName)
Startet die gegebene Anwendung.
Definition: OK.cs:934
void LogSelected(string fpsFunctionalname)
Dokumentiert den markierten Text des gegebenen Objekts.
Definition: OK.cs:294
Klasse NOK representiert den Core Zustand NOK im Ausführungs-Modus.
Definition: NOK.cs:58
void MemorizeTooltip(string fpsFunctionalname, string fps_MemKeyName)
Dokumentiert den Tooltip-Text (Kurzinformation) des gegebenen Objekts.
Definition: OK.cs:610
void Select(string fpsFunctionalname, string fpsValue)
Auswahl aller Zeilen einer Liste/Tabelle, welche die gegebenen Daten enthalten.
Definition: OK.cs:660
static OKW_Memorize Instance
Diese Methode gibt die einzige Instanz dieser Klasse zurück.
void LogVerify(string fpsActual, string fpsExpected)
Logt Soll-Ist Vergeleich.
Definition: Logger.cs:364
void SetCurrentState(IOKW_State fp_CurrentState)
Setter zum Setzen des aktuellen Zustandes.
Definition: Core.cs:318
void SetFocus(string fpsFunctionalname)
Setzt den Fokus auf das gegebene Fensterobjekt.
Definition: OK.cs:872
string GetConst4Internalname(string fpsInternalname)
Methode ermittelt für Internalname und der aktuell eingestellten Sprache den Wert für Const...
Definition: OKW_Const.cs:551
void VerifyValue(string fpsFunctionalname, string fpsExpectedValue)
Prüft den Standardwert eines Objektes (in den meisten Fällen ist dies der angezeigte Text)...
Definition: OK.cs:1421
string Boolean2YesNo(bool fpbTrueOrFalse)
Konvertiert WAHR/FALSCH (true/false) sprachabhängig nach "Ja"/"Nein" (Yes/No)
Definition: OKW_Const.cs:336
void BeginTest(string fpsTestname)
Markiert den Anfang eines neuen Testfalls.
Definition: OK.cs:99
void SetLanguage(string Language)
Definition: OK.cs:892
OKW_Const verwaltet die sprachabhängigen OKW-Konstanten.
Definition: OKW_Const.cs:128
void MemorizeTablecellValue(string fpsFunctionalname, string fpsCol, string fpsRow, string fps_MemKeyName)
Merkt sich den Wert der gegebenen Zelle in der Tabelle.
Definition: OK.cs:583
void Sequence(string fpsObjectName, string fpsSequenceName, string SEQ_ID)
Ruft die Sequenz eines Fensters auf.
Definition: OK.cs:843
void FileDelete(string fpsPathAndFileName)
Löscht die gegebene Datei.
Definition: OK.cs:1508
void SetValue(string fpsFunctionalname, string fpsValue)
Setzt den Wert des gegebenen Fensterobjekts auf den gegebenen Wert.
Definition: OK.cs:902
void MemorizeSelectedValue(string fpsFunctionalname, string fps_MemKeyName)
Keine Beschreibung zu "MemorizeSelectedValue" verfügbar.
Definition: OK.cs:558
static bool DirectoryExist(string fpsPaFiNa)
Prüft, ob die gegebene fpsPaFiNa Datei existiert.
void SelectWindow(string fpsFunctionalname)
Setzt den Kontext auf das gegebene Fenster.
Definition: OK.cs:823
void MemorizeValue(string fpsFunctionalname, string fps_MemKeyName)
Keine Beschreibung zu "MemorizeLabel" verfügbar.
Definition: OK.cs:635
OKW_Memorize ist die Speicher-Klasse hinter den Merke*-Schlüsselwörter.
Definition: OKW_Memorize.cs:72
void MemorizeCaption(string fpsFunctionalname, string fps_MemKeyName)
Keine Beschreibung zu "MemorizeCaption" verfügbar.
Definition: OK.cs:415
static OKW_Docu Instance
Holt die einzige Instanz dieser Klasse.
Definition: OKW_Docu.cs:139
void StopApp(string fps_ApplikationName)
Beendet eine gegebene Anwendung.
Definition: OK.cs:954
string GetOKWConst4Internalname(string fpsInternalname)
Methode ermittelt für Internalname und der aktuell eingestellten Sprache den Wert für OKWConst...
Definition: OKW_Const.cs:654
void LogLabel(string fpsFunctionalname)
Keine Beschreibung zu "LogLabel" verfügbar.
Definition: OK.cs:266
void TypeKey(string fpsFunctionalname, string fpsValue)
Tastatureingaben von Daten in das aktive Fensterobjekt.
Definition: OK.cs:974
void SelectTablecell(string fpsFunctionalname, string fpsCol, string fpsRow)
Wählt die gegebene Tabellenzelle aus.
Definition: OK.cs:771
void TypeKeyWindow(string fpsFunctionalname, string fpsValue)
Tastatureingabe in ein bestimmtes Fensterobjekt.
Definition: OK.cs:1043
void LogHasFocus(string fpsFunctionalname)
Dokumentiert den Fokus-Status des gegebenen Objekts.
Definition: OK.cs:215
Designpattern: Singelton Hier gilt das Highlander Prinzip: "Es kann nur einen geben". D.h. nur eine Instanz dieser Klasse, die für das Lesen der Nachrichten Zuständig ist. Diese Klasse selbst ist eine OKW-Fundametalklasse und gibt keine Nachrichten aus. TODO: Nachricht weiter-Linken auf einen Andren Tag. Ziel: Wiederkehrende Nachrichten werden nur einmal gepflegt.
Definition: OKW_Docu.cs:65
LogMessenger liest Log-Meldungen sprachspezifisch für die im Konstruktor gegeben Klasse aus der Zugeh...
Definition: LogMessenger.cs:90
Klasse OK representiert den Core Zustand OK.
Definition: OK.cs:60
void VerifyFileExists(string fpsPathAndFileName, string fpsExpectedValue)
Prüft, ob die gegebene Datei existiert.
Definition: OK.cs:1547
void VerifyDirectoryExists(string fpsPath, string fpsExpectedValue)
Prüft, ob das gegebene Verzeichnis existiert.
Definition: OK.cs:1600
Description of OKW_FileHelper.
void LogPrintDebug(string fpsMessage)
Loggt eine Nachricht.
Definition: Logger.cs:332
IOKW_State ist die Schnittstelle der OKW-Klasse. Die OKW-Klasse wird vom State-Design-Muster abgeleit...
Definition: IOKW_State.cs:54
Hier Statediagram...
Definition: Core.cs:95
void VerifyCaption(string fpsFunctionalname, string fpsExpectedValue)
Keine Beschreibung zu "VerifyCaption" verfügbar.
Definition: OK.cs:1073
static bool FileExist(string fpsPaFiNa)
Prüft, ob die gegebene fpsPaFiNa Datei existiert.
void LogTablecellValue(string fpsFunctionalname, string fpsCol, string fpsRow)
Dokumentiert den Wert der ausgewählten Zelle.
Definition: OK.cs:328
void VerifyTablecellValue(string fpsFunctionalname, string fpsCol, string fpsRow, string fpsExpectedValue)
Vergleicht den Inhalt der gegebenen Tabellenzeile mit dem erwarteten Wert.
Definition: OK.cs:1336
static List< string > ParseMe(List< string > fpLsString2Parse)
Parst einen _List< string>, ersetzt die Parser-Schlüsslewörter durch Werte.
Definition: Parser.cs:31
void MemorizeIsActive(string fpsFunctionalname, string fps_MemKeyName)
Merkt sich den Zustand des gegebenen Objekts.
Definition: OK.cs:508
void MemorizeExists(string fpsFunctionalname, string fps_MemKeyName)
Merkt sich den aktuell existierenden Zustand des Objekts.
Definition: OK.cs:440
string ConcatSEP(List< string > fpLs_ListString2Concat)
Methode verbindet die einzelne Strings eines.
Definition: OKW_Const.cs:440
void LogTooltip(string fpsFunctionalname)
Dokumentiert die Kurzinfo zu einem Werkzeug des gegebenen Objekts.
Definition: OK.cs:359
void VerifyLabel(string fpsFunctionalname, string fpsExpectedValue)
Keine Beschreibung zu "VerifyLabel" verfügbar.
Definition: OK.cs:1252
void ClickOn(string fpsFunctionalname)
Klickt auf das gegebene Objekt.
Definition: OK.cs:112
void LogCaption(string fpsFunctionalname)
Keine Beschreibung zu "LogCaption" verfügbar.
Definition: OK.cs:162
string Language
Gets or sets a string property.
Definition: OKWLanguage.cs:77
void Set(string fpsKey, string fpsValue)
OK(Core fp_OKW)
Klasse representiert den Zustand "OK" des OKW-Kerns im Ausführungsmodus.
Definition: OK.cs:84
void ResCloseList()
Closes a hierarchical level in the results file that was opened with ResOpenList. Use ResOpenList to ...
Definition: Logger.cs:392
Definition: Core.cs:40
List< string > SplitSEP(string fpsString2Split)
Methode trennt einen String und wandelt diesen in einen Liststring um. Der Schnitt wird an der Konsta...
Definition: OKW_Const.cs:786
void SelectMenu(string fpsFunctionalname, string fpsValue)
Wählt den gegebenen Menüeintrag aus.
Definition: OK.cs:748