javascript - Recommended way to locate parent element in Protractor -


according newly published style guide, using by.xpath() locators considered bad practice. i'm trying follow suggestion, stuck on getting parent element.

currently using .. xpath expression element's parent:

this.dashboard = element(by.linktext("dashboard")).element(by.xpath(".."));  

how can locate element's parent using other built protractor/webdriverjs locators?

alecxe, while dig style guide, , agree xpath avoided, there's exception proves rule. think 1 of cases :)


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -