Karthik
Karthik

Reputation: 1074

How to get the hidden element value in Protractor.NET?

I have an input type hidden which stores a primary key id. How can I get the hidden type value? Is that possible to get the value using Protractor.NET?

Below is my code to get the Id value but in vain

 NgWebDriver.FindElement(NgBy.Model("editor.myModel.id"));

Upvotes: 1

Views: 494

Answers (1)

alecxe
alecxe

Reputation: 473863

Use Evaluate() to evaluate the value of the model in the context of the element:

element.Evaluate("editor.myModel.id")

Upvotes: 1

Related Questions