42 namespace OKW.GUI.Selenium
45 using System.Collections.Generic;
50 using OpenQA.Selenium;
51 using OpenQA.Selenium.Support.UI;
81 public virtual void Select(List<string> fps_Values)
83 this.LogFunctionStartDebug(
"Select",
"fps_Values", fps_Values.ToString());
88 if (!this.GetExists())
90 string lvsLM = this.LM.GetMessage(
"Common",
"OKWGUIObjectNotFoundException",
"Select()");
95 SelectElement SelectList =
new SelectElement(this.Me());
97 foreach (
string lvsValue
in fps_Values )
99 SelectList.SelectByText(lvsValue);
104 this.LogFunctionEndDebug();
125 public virtual void SetValue(List<string> fpsValues)
127 this.LogFunctionStartDebug(
"SetValue",
"fpsValues", fpsValues.ToString());
132 if (!this.GetExists())
134 string lvsLM = this.LM.GetMessage(
"Common",
"OKWGUIObjectNotFoundException",
"Select()");
138 SelectElement SelectList =
new SelectElement(this.Me());
141 if (SelectList.IsMultiple)
143 SelectList.DeselectAll();
147 if (fpsValues.Count > 1)
148 MyLogger.LogError(
"ListBox erlaub keine Mehrfachauswahl." );
155 foreach (
string lvsValue
in fpsValues )
157 SelectList.SelectByText(lvsValue);
162 this.LogFunctionEndDebug();
182 List<string> lvLsReturn =
new List<string>();
187 MyLogger.LogFunctionStartDebug(
"GetValue");
189 SelectElement SelectList =
new SelectElement(this.Me());
191 foreach(IWebElement Option
in SelectList.AllSelectedOptions)
193 lvLsReturn.Add( Option.GetAttribute(
"textContent") );
202 MyLogger.LogFunctionEndDebug(lvLsReturn);
206 MyLogger.LogFunctionEndDebug();
214 #endregion Constructors
SeListBox(string Locator)
TODO: Konstruktor des SeListBoxs.
virtual void SetValue(List< string > fpsValues)
Methode setzt einen oder mehrere Werte in einer ListBox.
Diese Ausnahme wird ausgelöst, wenn ein GUI-Objekt zu den im Frame gegebenen Objekterkennungseigensch...
virtual void Select(List< string > fps_Values)
Methode wählt einen oder mehrere Werte in einer ListBox aus.
override List< string > GetValue()
Holt die aktuell ausgewählten Werte aus der ListBox.
SeListBox ist ein Selenium GUI-Objekt. Erbt von SeAnyWin.