I have a setting in my angular based website that turns a dropdown on and off. If it is off, then it does not show on the main page.
With Protractor, I need to check to
These answers do not wait for the element to disappear. In order to wait for it to disappear you need to use ExpectedConditions like below. InvisibilityOf detects whether an element has left the DOM. See it in the docs here: https://www.protractortest.org/#/api?view=ProtractorExpectedConditions.
export const invisibilityOf = (el) =>
browser.wait(ExpectedConditions.invisibilityOf(el) as any, 12000,
'Element taking too long to disappear in the DOM')
const el = element(by.css(arg1))
return invisibilityOf(el)