Hi everyone, I'm a new member of this forum and I'm just starting out with coding for the first time.
I have encountered an issue with a specific part of my code:
md-input-container class="md-default-theme md-input-invalid">>
label for="input_4">Email</label>
input name="emailField" type="email" ng-model="email" ng-change="resetValidity()" auto-focus="" validate-email="" required="" class="ng-pristine md-input ng-valid-email ng-invalid ng-invalid-required ng-touched" id="input_4" tabindex="0" aria-required="true" aria-invalid="true" style="">
!-- ngIf: forgot_password.emailField.$invalid && forgot_password.$submitted -->
/md-input-container>
The ID of the field changes every time I open a session. I've tried the following solution:
WebElement emailField = driver.findElement(By.cssSelector("input[name='emailField']"));
emailField.click();
emailField.sendKeys("aa@aa");
This element can also be found on the URL: "ocloud.optitex.com". If you go to "forgot password," I'm attempting to locate the email field, click on it, and input text.
Unfortunately, nothing happens when I run the code. Instead, I receive the following error message:
No such Element Exception, unable to locate element.
I would greatly appreciate any assistance on how I can successfully click on the field and input text.