public void Equals_False_QueryType() { var a = new WebLocator("hello", By.Id("moto")); var b = new WebLocator("hello", By.CssSelector("moto")); a.Equals(b).Should().BeFalse(); }
public void Equals_False_QueryValue() { var a = new WebLocator("hello", By.Id("moto")); var b = new WebLocator("hello", By.Id("goodbye")); a.Equals(b).Should().BeFalse(); }
public void Equals_False_Description() { var a = new WebLocator("hello", By.Id("moto")); var b = new WebLocator("goodbye", By.Id("moto")); a.Equals(b).Should().BeFalse(); }
public void Equals_False_NonWebLocator() { var a = new WebLocator("hello", By.Id("moto")); var b = new object(); a.Equals(b).Should().BeFalse(); }
public void Equals_True() { var a = new WebLocator("hello", By.Id("moto")); var b = new WebLocator("hello", By.Id("moto")); a.Equals(b).Should().BeTrue(); }
public void GetHashCode_Different_QueryValue() { var a = new WebLocator("hello", By.Id("moto")); var b = new WebLocator("hello", By.Id("goodbye")); int codeA = a.GetHashCode(); int codeB = b.GetHashCode(); codeA.Should().NotBe(codeB); }
public void GetHashCode_Different_NonWebLocator() { var a = new WebLocator("hello", By.Id("moto")); var b = new object(); int codeA = a.GetHashCode(); int codeB = b.GetHashCode(); codeA.Should().NotBe(codeB); }
public void GetHashCode_Same() { var a = new WebLocator("hello", By.Id("moto")); var b = new WebLocator("hello", By.Id("moto")); int codeA = a.GetHashCode(); int codeB = b.GetHashCode(); codeA.Should().Be(codeB); }
//[TestCase(1, 1)] public void TestWebLocator() { WebLocator w = new WebLocator() //.setRoot("//ROOT") .setContainer(new WebLocator()) .setText("Test", new List <SearchType> { new SearchType().Equals() }) .setTag("table") .setClasses("", ""); ; Console.WriteLine("XPath: " + w.XPath()); //Assert.AreEqual(a, b); //IWebDriver driver = new ChromeDriver(); //driver.Navigate().GoToUrl("http://qa-nimbus.sdl.com/task-inbox/"); //driver.Manage().Window.Maximize(); //driver.Close(); //driver.Quit(); }
public WebElement(WebLocator locator) : this("", locator) { }
public WebElement(string name, WebLocator locator) : base(name) { Locator = locator; }