Selenium-Foundation icon indicating copy to clipboard operation
Selenium-Foundation copied to clipboard

ContainerMethodInterceptor.loadIsComplete() performs an unchecked cast to DetectsLoadCompletion

Open sbabcoc opened this issue 3 years ago • 0 comments

The loadIsComplete() 'wait' proxy method an unchecked cast from SearchContext to DetectsLoadCompletion. This presents the very real risk of triggering a ClassCastException by being invoked within a context that doesn't implement this interface. To resolve this, the implementation of the 'wait' proxy apply() method should ensure that the supplied context is instanceof DetectsLoadCompletion, If it's not, log a warning and return true to abort the load completion check gracefully.

sbabcoc avatar Oct 08 '22 20:10 sbabcoc