P Ghanghar P Ghanghar - 3 months ago 13x
Java Question

Selenium Webdriver - Element not visible

I am new to selenium webdriver. I am trying to do registration for


I am able to switch to pop up and able to fill all field values. But when I try to click on SUBMIT button it shows exception
Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: element not visible

I have used Xpath with below code:


HTML is:

<div class="span_1_of_4" align="center">
<input class="button" type="submit" value="Submit">

Any help will be greatly appreciated. Thanks in advance


As I see in your provided website url there are two Submit buttons are present, so when you are using xPath .//*[@id='load_form']/div/div[2]/input it returns two submit button and it goes to click on first Submit button which is not visible on the form, So you should try as below :-

driver.findElement(By.cssSelector("div#load_box input.button")).click();

Hope it will work..:)