14 namespace OKW.GUI.Selenium.ADF
17 using System.Collections.Generic;
23 using OpenQA.Selenium;
38 #endregion Constructors
42 public virtual IWebElement FindNode(
string fpsXPATH2Node)
44 this.LogFunctionStartDebug(
"FindNode",
"String fpsXPATH2Node", fpsXPATH2Node);
47 IWebElement DomTreeRoot = Me();
49 IWebElement ElementLabel = DomTreeRoot;
50 IWebElement ElementGuard;
52 IWebElement lv_ReturnElement = null;
54 DomTreeRoot.Highlight();
57 List<string> lvls_Nodes;
61 for (
int lvi_i = 0; lvi_i < lvls_Nodes.Count; lvi_i++)
65 ElementLabel = ElementLabel.FindElement(By.XPath(
"//*[text()='" + lvls_Nodes[lvi_i] +
"']"));
66 ElementGuard = ElementLabel;
67 ElementGuard.Highlight();
75 if (ElementGuard.GetAttribute(
"class") ==
"xso")
81 ElementGuard = ElementGuard.FindElement(By.XPath(
".."));
86 if (lvi_i == lvls_Nodes.Count - 1)
89 lv_ReturnElement = ElementLabel;
96 ElementGuard.Highlight();
97 IWebElement ElementIMG = ElementGuard.FindElement(By.XPath(
".//a"));
98 ElementIMG.Highlight();
102 ElementIMG.Highlight();
105 System.Threading.Thread.Sleep(2000);
110 Logger.Instance.
LogPrint(
"Knoten " + lvls_Nodes[lvi_i] +
"nicht aufklappbar");
115 this.LogFunctionEndDebug(lv_ReturnElement.ToString());
116 return lv_ReturnElement;
119 public virtual void Select(List<string> fpsValues)
121 IWebElement ElementNode;
123 for (
int i = 0; i < fpsValues.Count; i++)
125 ElementNode = this.FindNode(fpsValues[i]);
132 public void Click_On(
string Click_Type)
134 throw new NotImplementedException();
137 public void Select(System.Collections.Generic.List<
string> Values,
string Click_Type)
139 throw new NotImplementedException();
void LogPrint(string fps_Message)
LogPrint Function: Prints the values of expressions to the results file.
Klasse enthält OKW-Hilfsfunktionen.
static OKW_Ini Instance
Singelton-Pattern: Instanz gibt die aktuelle, gültige und einzige Innstanz der Klasse zurück...
string PathSep
Öffentliches Property "PathSep".
OKW.OKW_Ini ist die Klasse zur Konfigurationsdatei OKW_Ini.xml.
OKW_CustomSettings OKW_CustomSettings
Dieses Feld hält den Abschnitt OKW_CustomSettings der OKW_Ini.xml vor.
static List< string > StrSplit(string fpsString2Split, string fpsSeparator)
Splittet einen string am angegebenen Separator auf. Der Separator kann aus mehr als einem Zeichen bes...
static bool MatchStr(string fpsPattern, string fpsStringToMatch)
Quelle: http://stackoverflow.com/questions/6907720/need-to-perform-wildcard-etc-search-on-a-string-us...