sbabcoc / Selenium-Foundation

Selenium Foundation is an automation framework designed to extend and enhance the capabilities provided by Selenium (WebDriver).
Apache License 2.0
59 stars 16 forks source link

ContainerMethodInterceptor.loadIsComplete() performs an unchecked cast to DetectsLoadCompletion #252

Closed sbabcoc closed 1 year ago

sbabcoc commented 1 year ago

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 commented 1 year ago

Resolved by #254