Get Value from a Input Box in Selenium with no attribute in markup

221 Views Asked by At

I have the following markup and in the browser it displays 'XYZ' but I see no attribute that I can use to grab it using Selenium and C#. Does it have to do with this being an angular element ?

<input class="primary-input ng-untouched ng-pristine" formcontrolname="EmployeeCode" maxlength="4" name="EmployeeCode" placeholder="" disabled="">

I tried

string val = Driver.FindElement(By.Name("EmployeeCode")).GetAttribute("value");
0

There are 0 best solutions below