1
我想找到一種通過使用名稱來提取完整元素的XPath的方法。 比如我有這樣的事情:如何使用iOS上的Appium從元素名稱中提取xpath
name: Moses
type: UIAStaticText
xpath: "//UIAApplication[1]/UIAWindow[1]/UIAScrollView[1]/UIAStaticText[3]"
現在我想找到使用「摩西」的名字標籤的完整的XPath。
SeleniumHelper.GetElement("//UIAStaticText[(@name='Moses')]");
但這似乎並不奏效。 歡呼聲中,帕維爾
// UIAStaticText [contains(@name,'Moses')]'? – alecxe 2015-04-01 15:12:47
我仍然得到相同的對象,但它似乎不包含xpath值。 IWebElement oElem = SeleniumHelper.GetElement(「// UIAStaticText [contains(@name,'Moses')]」); oElem.GetAttribute(「xpath」); 那裏我失敗 – 2015-04-01 15:21:32
你能顯示輸入文件嗎? – 2015-04-01 18:43:41