Angular protected form, index out range

Have some way to force type input?

<input _ngcontent-mys-c125="" matinput="" formcontrolname="nome" maxlength="200" type="text" placeholder="ex: Digite aqui " class="mat-input-element mat-form-field-autofill-control input-margin ng-tns-c85-0 cdk-text-field-autofill-monitored ng-dirty ng-touched ng-invalid" id="mat-input-0" aria-invalid="true" aria-required="false" aria-describedby="mat-error-5">

Doesn’t matter if I copy input as ID, selector, or class, or xpath…
this got my attention: cdk-text-field-autofill-monitored ng-dirty ng-touched

Any way to bypass?

Use this as selector

1 Like

Oh my God, I love you baby :heart_eyes: :rofl: :rofl: :rofl:

really simple, but it also works to class attribute?
I mean, like that:

<input aria-invalid="false" type="text" class="MuiInputBase-input MuiOutlinedInput-input jss14 MuiInputBase-inputMarginDense MuiOutlinedInput-inputMarginDense" value="">

Would work?

[class=MuiInputBase-input MuiOutlinedInput-input jss14 MuiInputBase-inputMarginDense MuiOutlinedInput-inputMarginDense]

For the class, the selector would be


if there are more than 1 classes though (separated by a space), like in your case, chain them like this


so in your case

1 Like