Hello There,
I am trying to run a test on CLI but it is failing there when the same tests is passing in Web.
The test is failing when clicking on “Rechercher”. I have to click there and set a text for it to search for the word i input there.
My xpath is:
//*[@id=‘mat-input-0’]
I have used focus, waitforElementPresent, delay() but it is showing me error:
I even tried with JS but still it is still be stepfailed in terminal.
I have run out of ideas.
The html is below:
<input _ngcontent-axy-c92="" matinput="" type="search" name="filter" class="mat-input-element mat-form-field-autofill-control ng-tns-c61-0 ng-pristine ng-valid cdk-text-field-autofill-monitored ng-touched" placeholder="Rechercher" id="mat-input-0" data-placeholder="Rechercher" aria-invalid="false" aria-required="false">
Can someone please help me on this. Before clicking on “Rechercher” there is a button, it was able to click it successfully but fails when clicking on “Rechercher”.
I think either it is not able to reach on this small page of the page, but before that the button was on this same size page, it should have failed here as well.
Also is there a possibility that an xpath can be incorrect when it is working correctly on web but not in terminal?
The window size also is set.
Thank you