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

python - What's the Pythonic way to report nonfatal errors in a parser? -

sql server - Deadlock occuring in Clustered Columnstore index -

php - curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to domain.com:443 -