Here you can find the script for protractor
Add reference Protractor library to Application,
using Protractor; // Namespace need to be included
using (IWebDriver ngDriver = new NgWebDriver(new FirefoxDriver()))
{
ngDriver.Url = "http://www.angularjs.org";
ngDriver.FindElement(NgBy.Model("yourName")).SendKeys("Selenium");
System.Console.WriteLine("TEST : " + ngDriver.FindElement(NgBy.Model("yourName")).Text);
Assert.AreEqual("Hello Selenium!", ngDriver.FindElement(NgBy.Binding("yourName")).Text);
}
Add reference Protractor library to Application,
using Protractor; // Namespace need to be included
using (IWebDriver ngDriver = new NgWebDriver(new FirefoxDriver()))
{
ngDriver.Url = "http://www.angularjs.org";
ngDriver.FindElement(NgBy.Model("yourName")).SendKeys("Selenium");
System.Console.WriteLine("TEST : " + ngDriver.FindElement(NgBy.Model("yourName")).Text);
Assert.AreEqual("Hello Selenium!", ngDriver.FindElement(NgBy.Binding("yourName")).Text);
}
0 comments