I am trying to implement an \"object picker\" to my Selenium based framework as is common on most commercial automation tools. To do this I am using a Javascript command to
I was having this issue as well. The reason it was being thrown I found out was because the element I was trying to get the location of was hidden (had the attribute display:none). And therefore didn't have a location.