What is the syntax for selecting an element in protractor via element name
angularjs, protractor
Solution
There's a couple ways to do this - you can either get it by tagName or by css selector. So any of the following work:
element(by.css('h1')); // works with any css selector
$('h1'); // works with any css selector
element(by.tagName('h1'));
Problem
Is it possible to get an element by its name like you can with jQuery? I'm trying to do the equivalent of the jQuery selector like in jQuery ``` $('h1') ``` how is this done with protractor? I tried ``` element('h1') ``` but it doesn't work