File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/main/java/aquality/selenium/browser/devtools Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 12
12
import org .openqa .selenium .devtools .idealized .Events ;
13
13
import org .openqa .selenium .devtools .idealized .Javascript ;
14
14
import org .openqa .selenium .devtools .idealized .ScriptId ;
15
+ import org .openqa .selenium .devtools .idealized .target .model .SessionID ;
15
16
import org .openqa .selenium .devtools .v85 .page .Page ;
16
17
import org .openqa .selenium .devtools .v85 .page .model .ScriptIdentifier ;
17
18
import org .openqa .selenium .devtools .v85 .runtime .Runtime ;
@@ -111,7 +112,9 @@ private void removeInitializationScriptCore(InitializationScript script) {
111
112
final Field pinnedScripts = Javascript .class .getDeclaredField ("pinnedScripts" );
112
113
pinnedScripts .setAccessible (true );
113
114
//noinspection unchecked
114
- ((Map <String , ScriptId >)pinnedScripts .get (engine )).remove (script .getScriptSource ());
115
+ ((Map <SessionID , Map <String , ScriptId >>)pinnedScripts .get (engine ))
116
+ .get (tools .getDevToolsSession ().getCdpSession ())
117
+ .remove (script .getScriptSource ());
115
118
pinnedScripts .setAccessible (false );
116
119
} catch (ReflectiveOperationException e ) {
117
120
AqualityServices .getLogger ().fatal ("Error while removing initialization script" , e );
You can’t perform that action at this time.
0 commit comments