angular - Find if element contains element with id -


how can find if element contains element specified id?

<div class="menu">   <div id="signin">sign in</div> </div> 

i'm checking query length here thought there might better way:

it('main menu has signin link if not signed in', () => {     fixture.detectchanges();     let links = menuelemdebug.queryall(by.css('#signin-button'));     expect(links.length).tobe(1); }) 

try simple css selection like:

let links = menuelemdebug.queryall(by.css('.menu> #signin')); 

but if going after element id, guess uniquely identified.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -