Forum Discussion

Mpho_Mogapi's avatar
Mpho_Mogapi
Occasional Contributor
6 years ago

Is Testcomplete compatible with Angular Material?

I have this html , taken from https://material.angular.io/components/select/overview 

 

To see the rendering of the code below go to https://stackblitz.com/angular/vvqbegyprlm?file=package.json

 

<form>
  <h4>mat-select</h4>
  <mat-form-field>
    <mat-select placeholder="Favorite food" [(ngModel)]="selectedValue" name="food" role="SELECT">
      <mat-option *ngFor="let food of foods" [value]="food.value">
        {{food.viewValue}}
      </mat-option>
    </mat-select>
  </mat-form-field>
  <p> Selected food: {{selectedValue}} </p>
  <h4>native html select</h4>
  <mat-form-field>
    <select matNativeControl placeholder="Favorite car" [(ngModel)]="selectedCar" name="car">
      <option value="" selected></option>
      <option *ngFor="let car of cars" [value]="car.value">
        {{car.viewValue}}
      </option>
    </select>
  </mat-form-field>
  <p> Selected car: {{selectedCar}} </p>
</form>
 

when I spy this object it finds all the panels for the <div class...> objects but doesnt recognize the <mat-select class...>  but it  correctly identifies native html select <select> with wSelectedItem property .

 

Does Testcomplete not support custom html tags? Or is it somehow possible to add those custom html tags to the object spy