Beispiel #1
0
        public void TestXPath()
        {
            var actual = new XPathBy("aaa").XPath("xxx").XPath("yyy");

            Assert.That(actual.Selector, Is.EqualTo("aaaxxxyyy"));
        }
Beispiel #2
0
        public void TestThenDescendant()
        {
            var actual = new XPathBy().ThenDescendant("*@xxx");

            Assert.That(actual.Selector, Is.EqualTo("//*@xxx"));
        }
Beispiel #3
0
        public void TestWithId()
        {
            var actual = new XPathBy().WithId("xxx");

            Assert.That(actual.Selector, Is.EqualTo("[@id='xxx']"));
        }
Beispiel #4
0
        public void TestWithIndex()
        {
            var actual = new XPathBy().WithIndex(123);

            Assert.That(actual.Selector, Is.EqualTo("[124]"));
        }
Beispiel #5
0
        public void TestThenChild()
        {
            var actual = new XPathBy().ThenChild("*@xxx");

            Assert.That(actual.Selector, Is.EqualTo("/*@xxx"));
        }
Beispiel #6
0
        public void TestWithAttribute()
        {
            var actual = new XPathBy().WithAttribute("xxx");

            Assert.That(actual.Selector, Is.EqualTo("[@xxx]"));
        }
Beispiel #7
0
 public static XPathBy Component <T>(this XPathBy xPathBy)
 {
     return(xPathBy.WithAttribute("data-component-name", typeof(T).Name));
 }
Beispiel #8
0
 public static XPathBy Component(this XPathBy xPathBy, string name)
 {
     return(xPathBy.WithAttribute("data-component-name", name));
 }
Beispiel #9
0
 public static ItemBy FixedByKey(this XPathBy xPathBy)
 {
     return(xPathBy.FixedByAttribute("data-key"));
 }
Beispiel #10
0
 public static XPathBy WithKey(this XPathBy xPathBy, string key)
 {
     return(xPathBy.WithAttribute("data-key", key));
 }
Beispiel #11
0
 public static XPathBy WithTid(this XPathBy xPathBy, string tid)
 {
     return(xPathBy.WithAttribute("data-tid", tid));
 }