I have a button:
<button type="submit" class="btn btn-default btn-auth">Anmelden</button>
nightwatch doesn't find it these ways:
browser.waitForElementPresent('//button[@class="btn btn-default btn-auth"]', 5000);
browser.waitForElementPresent('//button[contains(@class, "btn btn-default btn-auth")]', 5000);
browser.waitForElementPresent('//button[text()="Anmelden"]', 5000);
browser.waitForElementPresent('//button[contains(text(), "Anmelden")]', 5000);
but it is found this way:
browser.waitForElementPresent('.btn.btn-default.btn-auth');
Why are the 4 commands above not working? I have to checkout for text()
because I have multiple buttons with the same class.