I have a problem with selecting an option in mat-select with the use of google chrome extensions. Extensions can fulfill inputs but mat-selects remains untouched.
I've tried to use extensions like: Autofill, Form-O-Filler. By default extensions can't reach mat-selects. To obtain my goal I used javascript code to select option/value but it didnt work.
My summarized mat-select looks like this:
<mat-form-field appearance="outline" class="name">
<mat-select formControlName="name"
[mctPristine]="group?.name"
name="name"
id="name">
<mat-option *ngFor="let name of names" [value]="name">
name
</mat-option>
</mat-select>
</mat-form-field>
I have used code below to choose value:
document.getElementById('name').value='Patryk';
and this:
document.getElementById('name').selectedIndex='0';
Unfortunately this does not work at all. Should i change my javascript code? Or chrome extension?