Note: This is not this error. Have tried the resolution steps mentioned in that error as well.
I am getting the following error in my Angular 6 app
ERROR TypeError: this.driver.matchesElement is not a function
at TransitionAnimationEngine.processLeaveNode (browser.js:2985)
at TransitionAnimationEngine.flush (browser.js:3021)
at InjectableAnimationEngine.AnimationEngine.flush (browser.js:3858)
at eval (animations.js:365)
at ZoneDelegate.invoke (zone.js:388)
at Zone.run (zone.js:138)
at NgZone.runOutsideAngular (core.js:4708)
at AnimationRendererFactory.end (animations.js:363)
at DebugRendererFactory2.end (core.js:15153)
at ViewRef_.detectChanges (core.js:11623)