Q:

Send Keys is not working on a login container

I am trying to automate logging into our application using Protractor w/ Selenium (C#).  I know the proper way to do this is as such:
_ngDriver.FindElement(By.Id(inputTextId));
_ngDriver.FindElement(By.Id(inputTextId)).Clear();
_ngDriver.FindElement(By.Id(inputTextId)).SendKeys(inputText);

My problem is that my code finds the element in the first line but then breaks when I try to do either the Clear() or the SendKeys() giving me this error:
unknown error: cannot focus element

(Session info: chrome=51.0.2704.103)
  (Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.1.7601 SP1 x86_64)

One more thing.  When I place a Click() rather than a Clear or SendKeys it works so I know I am looking at the correct frame.  Has anybody dealt w/ something similar and know a work around? 

A:

cannot focus element error usually happens when you try to send keys or issue a clear() method on a non-input element. Check that your by inputTextId id locator actually matches the input element.
Also, see if the desired element is the only one having this id.

