Question: Below is the tag for a password field in Login form.

Our guys used the same class name for EMail field also. Hence I cannot use className for password to locate it in protractor, since xpath and css(id design changes) are not reliable, what is the best option for me?

Tag for Email field:

```
<input class="native-input sc-ion-input-md" aria-labelledby="ion-input-0-lbl" autocapitalize="off" autocomplete="off" autocorrect="off" name="ion-input-0" placeholder="" required="" type="email">

```

Tag for password field:

```
<input class="native-input sc-ion-input-md" aria-labelledby="ion-input-5-lbl" autocapitalize="off" autocomplete="off" autocorrect="off" name="ion-input-5" placeholder="" required="" type="password">

```

For submit button:

```
<ion-button _ngcontent-rbh-c129="" type="submit" color="loginbutton ion-margin" class="ion-color ion-color-loginbutton ion-margin md button button-solid ion-activatable ion-focusable hydrated">Login</ion-button>

```

Answer: 
I don’t suggest you to go with `ion-input` properties since it’s Ionic related properties generated during the build process and it can be dynamic.

Use `type` instead since it is:

* Obvious
* Static

```
input[type="email"]

```

And

```
input[type="password"]

```

After some time you will have hard time understanding your own code and trying to recall what `ion-input-0` refers to.
By css: 

```
element(By.css('input[name="ion-input-0"][type="email"]')),

```

and: 

```
 element(By.css('input[name="ion-input-5"][type="password"]')),

```