File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -115,10 +115,12 @@ class CdpDriver implements AppDriver {
115115 // When connecting to an existing instance (launchChrome=false),
116116 // skip navigation if URL is about:blank or matches the CDP port
117117 // (the target already has content loaded).
118- final skipNav = ! _launchChrome &&
119- (_url.isEmpty ||
120- _url == 'about:blank' ||
121- _url.contains ('localhost:$_port ' ));
118+ // Skip navigation if: no URL, about:blank, or URL points to the CDP
119+ // debug port itself (user likely just wants to connect to existing tabs).
120+ final skipNav = _url.isEmpty ||
121+ _url == 'about:blank' ||
122+ _url.contains ('localhost:$_port ' ) ||
123+ _url.contains ('127.0.0.1:$_port ' );
122124 if (! skipNav) {
123125 await _call ('Page.navigate' , {'url' : _url});
124126 // Wait for DOMContentLoaded or timeout (much faster than fixed 2s delay)
You can’t perform that action at this time.
0 commit comments