I am facing an issue trying to locate a button that is defined under a specific class using XPATH. The error message "Unable to locate element" keeps popping up. Here are the details of the class:
<div class="aui-button-holder inputBtn" id="aui_3_4_0_1_202">
<span class="aui-button aui-button-submit" id="aui_3_4_0_1_201">
<span class="aui-button-content" id="aui_3_4_0_1_200">
<input class="aui-button-input aui-button-input-submit" type="submit" value="Sign In" id="aui_3_4_0_1_180">
</span>
</span>
<input type="button" class="aui-button-input aui-button-input-submit" onclick="parent.location='/web/offers/reg'" value="Register">
</div>
This is the code I have written:
WebElement login=driver.findElement(By.xpath("//div[@id='aui_3_4_0_1_180']"));
login.click();
Exception in thread "main" org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@id='aui_3_4_0_1_180']"}