XPath和Priority属性|

时间:2018-12-04 17:33:28

标签: xpath

我有两个XPath:

  1. [FindsBy(How = How.XPath, Using = "//a[contains(@href, '/PenSide')|//span[contains(text(), 'Side')]]")]
  2. [FindsBy(How = How.XPath, Using = "//a[contains(@id,'PenSide')]")]

这两个都与属性SideIcon(public IPageModelProperty SideIcon{ get; set; })关联

我想在这两个XPath上使用Priority属性。但是,它目前无法正常工作。

[FindsBy(How = How.XPath, Using = "//a[contains(@href, '/PenSide')|//span[contains(text(), 'Side')]]", Priority = 1)]
[FindsBy(How = How.XPath, Using = "//a[contains(@id,'PenSide')]", Priority = 2)]
public IPageModelProperty SideIcon{ get; set; }

0 个答案:

没有答案