Javascript – protractor get element by name tag

javascriptprotractorseleniumselenium-webdrivertesting

Currently I am working with protractor and Selenium web Driver.

I have the following problem:

I have a html page, and I make protractor clicking a button. Then a window pops up. This window contains a text box with the Name "Description":

<input type="Text" name="Description" ... />

Now when I try the following:

element(by.css('[name="Description"]')).sendKeys("rabbababab");

The browser does nothing, but protractor does not throw an error. No text is typed into the TextBox. Unfortunatelly, the name is the only way to identfy the input-TextBox.

What am I doing wrong?

Best Answer

Selecting directly by name works as well:

element(by.name('Description')).sendKeys("rabbababab");