14 namespace OKW.GUI.Selenium.ADF
17 using System.Collections.Generic;
23 using OpenQA.Selenium;
37 #endregion Constructors
41 public virtual IWebElement FindNode(
string fpsXPATH2Node)
43 this.LogFunctionStartDebug(
"FindNode",
"String fpsXPATH2Node", fpsXPATH2Node);
46 IWebElement DomTreeRoot = Me();
48 IWebElement ElementLabel = DomTreeRoot;
49 IWebElement ElementGuard;
51 IWebElement lv_ReturnElement = null;
53 DomTreeRoot.Highlight();
56 List<string> lvls_Nodes;
60 for (
int lvi_i = 0; lvi_i < lvls_Nodes.Count; lvi_i++)
64 ElementLabel = ElementLabel.FindElement(By.XPath(
"//*[text()='" + lvls_Nodes[lvi_i] +
"']"));
65 ElementGuard = ElementLabel;
66 ElementGuard.Highlight();
74 if (ElementGuard.GetAttribute(
"class") ==
"xso")
80 ElementGuard = ElementGuard.FindElement(By.XPath(
".."));
85 if (lvi_i == lvls_Nodes.Count - 1)
88 lv_ReturnElement = ElementLabel;
95 ElementGuard.Highlight();
96 IWebElement ElementIMG = ElementGuard.FindElement(By.XPath(
".//a"));
97 ElementIMG.Highlight();
101 ElementIMG.Highlight();
104 System.Threading.Thread.Sleep(2000);
109 Logger.Instance.
LogPrint(
"Knoten " + lvls_Nodes[lvi_i] +
"nicht aufklappbar");
114 this.LogFunctionEndDebug(lv_ReturnElement.ToString());
115 return lv_ReturnElement;
118 public virtual void Select(List<string> fpsValues)
120 IWebElement ElementNode;
122 for (
int i = 0; i < fpsValues.Count; i++)
124 ElementNode = this.FindNode(fpsValues[i]);
131 public void Click_On(
string Click_Type)
133 throw new NotImplementedException();
136 public void Select(System.Collections.Generic.List<
string> Values,
string Click_Type)
138 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...