public void TestXPath() { var actual = new XPathBy("aaa").XPath("xxx").XPath("yyy"); Assert.That(actual.Selector, Is.EqualTo("aaaxxxyyy")); }
public void TestThenDescendant() { var actual = new XPathBy().ThenDescendant("*@xxx"); Assert.That(actual.Selector, Is.EqualTo("//*@xxx")); }
public void TestWithId() { var actual = new XPathBy().WithId("xxx"); Assert.That(actual.Selector, Is.EqualTo("[@id='xxx']")); }
public void TestWithIndex() { var actual = new XPathBy().WithIndex(123); Assert.That(actual.Selector, Is.EqualTo("[124]")); }
public void TestThenChild() { var actual = new XPathBy().ThenChild("*@xxx"); Assert.That(actual.Selector, Is.EqualTo("/*@xxx")); }
public void TestWithAttribute() { var actual = new XPathBy().WithAttribute("xxx"); Assert.That(actual.Selector, Is.EqualTo("[@xxx]")); }
public static XPathBy Component <T>(this XPathBy xPathBy) { return(xPathBy.WithAttribute("data-component-name", typeof(T).Name)); }
public static XPathBy Component(this XPathBy xPathBy, string name) { return(xPathBy.WithAttribute("data-component-name", name)); }
public static ItemBy FixedByKey(this XPathBy xPathBy) { return(xPathBy.FixedByAttribute("data-key")); }
public static XPathBy WithKey(this XPathBy xPathBy, string key) { return(xPathBy.WithAttribute("data-key", key)); }
public static XPathBy WithTid(this XPathBy xPathBy, string tid) { return(xPathBy.WithAttribute("data-tid", tid)); }