I have this command:

@browser.element(:xpath => "/html/body/app/pages/div/div/div/div[3]/mi-perfil/div/div[3]/datos-personales/div/div[1]/span[2]").click

There is no problem with the direction of the Xpath, thats why i don't add the HTML code which is gigantic.

The Problem

When i run a scenario that run this command, I get :

unknown error: Element ... is not clickable at point (431, 8). Other element would receive the click: ...

BUT when i get into the IRB running each command, the click is done without problem.

I'm doing a click there because that span contains a button, like this:

<button class="btn btn-blue btn-less-rounded btn-s" type="button">Guardar</button> 

*If I add /button to the Xpath i get the same Error

*If I use .exists? gives =>true

*If I use .visible? gives =>true

*If I use .text gives =>Guardar

  • Really IRB or is that rails console. just curious Apr 29, 2017 at 0:07
  • I don't have Rails installed in this PC
    – user25268
    May 2, 2017 at 15:02

2 Answers 2


Finally I managed to click on it. What happened is that the button wasn't directly visible when it did the click so the error pop up. And with watir alone was extremely dificult but I manage to scroll easier with

gem install watir-scroll

Then you add to the step file:

require 'watir-scroll'

And in the code before the click I put this:

@browser.element(blabla).scroll.to :center

With this i make sure the button is in the visible part of the Browser.

Thanks for the hints ;)


Things I would try:

  • Try using find first to see if it scroll the item into view

  • Try using waits to see if it is a timing issue (start with a sleep to investigate, switch to explicit element wait if found).

  • Try resizing the windowe

  • I did as you suggested and this is what i got: Try using find first = I did scroll to the element and still got the same problem. Try using waits = I did wait and continued the flow since it finds it. Try resizing the window = I try to maximize and stuff with the window and still got the same problem.
    – user25268
    May 2, 2017 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.