I am trying to automate an Angular 2.0 application.
HTML Code:
<input _hello="" class="myclass" formcontrolname="phoneCtrl" required="" sdcleave="" sdmutekeys="[0-9]" type="text" placeholder="Phone number">
When I try to locate above element using xpath
locator, it gives me below mentioned error.
Tried Code:
//input[@class='myclass'][0]
Error:no such element: Unable to locate element: {"method":"xpath","selector":"//input[@class='myclass'][0]"}(..)
Can anyone help me on this issue?
See Question&Answers more detail:os