diff --git a/lib/PuppeteerSharp/IsolatedWorld.cs b/lib/PuppeteerSharp/IsolatedWorld.cs index e32f2ab16..86c0ffab1 100644 --- a/lib/PuppeteerSharp/IsolatedWorld.cs +++ b/lib/PuppeteerSharp/IsolatedWorld.cs @@ -156,8 +156,8 @@ internal override async Task TransferHandleAsync(IJSHandle handle) internal override async Task AdoptHandleAsync(IJSHandle handle) { - var cdpHandle = (CdpJSHandle)handle; - if (cdpHandle.Realm == this) + var cdpHandle = (ICdpHandle)handle; + if (((JSHandle)cdpHandle).Realm == this) { return handle; }