I am using Visual Studio 2015 as my IDE and
I installed protractor(version 0.10.2) to my project.
In my code below
[TestMethod]
public void Login()
{
IWebDriver driver = new ChromeDriver();
Now, I want to locate a 'Log In' button using buttonText locator.
However, when I tried
var ngDriver = new NgWebDriver(driver);
ngDriver.Url = "https://weather.com";
ngDriver.FindElement(By.ClassName("user-login")).Click();ngDriver.FindElement(NgBy.), only following options were displayed after NgBy.:
Binding,
Equals,
ExactBinding,
ExactRepeater,
Model,
ReferenceEquals,
Repeater,
SelectedOpion
When I tried this with WebStorm and Javascript, I was able to locate and work with button as below element(by.buttonText('Log In')).click();
Why isn't something like 'ButtonText' appear after NgBy.?
Even in Anthony Chu's blog, he is using Ngby.Input(), which I don't have in the list. Why am I missing all these locators?
I found that NgBy class under Protractor offers only followings: class NgBy
so maybe Protractor-net doesn't provide NgBy.ButtonText()? But it doesn't make sense to me. I think that I am still doing something wrong!