I am trying to the test an angularJs Frontend by using Selenium Webdriver with Java.
I would likte to send some keys to an email inputbox. The problem I am facing is, that the inputbox seems to be invisivile for selenium. I guess this has something to do with the ng-hide directive from angular. To be clear, I can defenitly see the inputbox when the testautomation starts, so for me as a person the inputbox seems to be visible.
Frontend Image:
HTML:
<input id="changedbyEmailInput" class="form-control ng-pristine ng-valid ng-empty ng-touched" type="text" ng-model="article.author.email" placeholder="Your Email" ng-hide="article.isTemp === false" style="">
Javacode to get the textbox:
element = driver.findElement(By.id("changedbyEmailInput"));
element.sendKeys(keys);
Javacode with Timeout
WebDriverWait wait = new WebDriverWait(driver, 10);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id("changedbyEmailInput")));
I also tried to use an timout but it just timeouts, so I guess it just never changes it's state.
PS: If someone knows if this issue is easy to solve by using protractor please let me know. I am open to switch to protractor if it will solve my problem.
Thank you!
Edit: The problem is solved. It has nothing to do with ng-hide. The id just wasn't uniqe. Therefore there was always one disabled inputbox.

document.querySelectorAll("[id='changedbyEmailInput']")in the browser's console?