I\'ve got a div in an HTML Page of which the name is always known and inside this div there is an href, the details of which are not known. It could be the direct child of the
it seems sytax error in your code
use this
element(by.className('divName')).find('a').click();