Replace ExpectedCondition (which is restricted to WebDriver for context)
with AnticipatedCondition (which uses the more flexible SearchContext
for context).