Getting “Element is not clickable at point (660, 360) ” and “Element not visible” error

Answered

I am trying to click on OK button in a pop-up window.
I ran the code for 10 times for the above functions.

For the first 5 attempt selenium clicked on that OK button but after that it started giving error  “Element is not clickable at point (660, 360) ” and “Element not visible” .

There is no changes in the attributes value in HTML code. I tried to increase the delay and check but now I am getting these errors.

What would be the possible reasons??

Train Asked on October 30, 2014 in Selenium WebDriver.
Add Comment
  • 4 Answer(s)
    Best answer

    Hi Som,

    You can get the cordinates of any object by using below code:

    
    Point MyPoint= Driver.findElement(By.id("Lakshay")).getLocation();
    
    System.out.println(MyPoint.x);
    
    System.out.println(MyPoint.y);
    
    

    Whenever we work on cordinates, we should always make the window maximised. I am not sure why did you tried performing any action using cordinates but your error says that clearly that there is something wrong in cordinates (660, 360) . May be the cordinate is not visible in the minimised window.

    Please close the question as well.

    Regards,
    Lakshay Sharma

    Professor Answered on November 5, 2014.
    Add Comment

    Hi Som,

    It is hard to tell with this small description. Is this a Modal box or Pop up window? Have you tried maximize the browser before clicking on it?  It seems like the object has changed it original position, please check the current points of object on maximized window.

    Regards,
    Lakshay Sharma

    Professor Answered on October 30, 2014.
    Add Comment

    Hello Lakshay

    I tried after maximizing the window and now its working fine.

    why does that occur in the default window??
    And if the position changes also, the attributes still remain the same and the modal window appear in that page
    (I hope you mean position of box like left or right in a page )

    And how to check points of a object (which you asked me to check)?

    Train Answered on November 5, 2014.
    Add Comment

    I never tried the cordinates thing in my code

    
    driver.findElement(By.id("radiofield-1650-inputEl")).click(); // fresh aplicant radio button
    
    Thread.sleep(1000);
    
    driver.findElement(By.id("button-1668-btnIconEl")).click(); // Proceed button
    
    Thread.sleep(3000);
    
    driver.findElement(By.name("salutation")).click();
    
    driver.findElement(By.xpath(".//*[@id='boundlist-1782-listEl']/ul/li[1]")).click();
    
    Thread.sleep(1000);
    
    driver.findElement(By.name("shortName")).sendKeys(strShortName);
    
    driver.findElement(By.name("printName")).sendKeys(strPrintName);
    
    driver.findElement(By.name("firstName")).sendKeys(strFirstName);
    
    driver.findElement(By.name("lastName")).sendKeys(strLastName);
    
    driver.findElement(By.id("combobox-1759-inputEl")).click();
    
    Thread.sleep(1000);
    
    

    The above is the part of the code where I was getting that error

    Train Answered on November 5, 2014.

    Not sure of the reason then. Use a break point before clicking on OK on modal box and do not maximise the window and see if the OK button is visible to you on the modal box or not. If not, then may be Selnium has handled this in their code that if the element is present on HTML and and not visible due to screen size, throw this error.

    on November 5, 2014.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.