allow to ask for remote host profiles and save token on first connection for later use
This commit is contained in:
@@ -54,7 +54,7 @@ class BrowserCLI:
|
||||
if self._browser is not None:
|
||||
return []
|
||||
targets = active_browser_targets()
|
||||
if len(targets) <= 1:
|
||||
if len(targets) <= 1 and not any(target.remote for target in targets):
|
||||
return []
|
||||
return targets
|
||||
|
||||
@@ -62,7 +62,10 @@ class BrowserCLI:
|
||||
results = []
|
||||
for target in self._multi_browser_targets():
|
||||
try:
|
||||
data = send_command(command, args, profile=target.profile)
|
||||
if target.remote:
|
||||
data = send_command(command, args, profile=target.profile, remote=target.remote, token=target.token)
|
||||
else:
|
||||
data = send_command(command, args, profile=target.profile)
|
||||
except (BrowserNotConnected, RuntimeError):
|
||||
continue
|
||||
results.append((target, data))
|
||||
|
||||
Reference in New Issue
Block a user