Bug 241597

Summary: [WebDriver] Automation session for already running browsers
Product: WebKit Reporter: Armin Co <armin.co>
Component: WebDriverAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Enhancement CC: aperez, bburg, lmoura, pangle, psaavedra, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch for live automation session none

Description Armin Co 2022-06-14 09:11:05 PDT
When doing automated tests with Selenium/WebDriver, the WebDriver binary associated with a given browser is in charge of spawing the Browser and connecting to it. But in some special cases e.g. when using browsers on embedded devices which are deeply integrated into the system it may not be possible for the BrowserDriver to start the browser. This creates the need for a way to connect to an already running browser and being able to take over this live session, controlling it remotely.

Some rough steps:

1. The browser has to be started in a way, configured by the system, that it will listen/accept a connection for a automation session.
2.The BrowserDriver needs the capability to connect to a already running browser. For being able to do that it has to receive the information where to connect to by the test framework as the BrowserDriver no longer can decide on which port and address it will connect/setup the browser.
3. In the test framework the option has to be added where the information about the already running browser can be added.

I have already a draft of a patch which adds this feature, but it lacks the capability of opening a new/second automation session after the first one was closed/exited.
Comment 1 Armin Co 2022-06-14 09:37:26 PDT
Created attachment 460234 [details]
Patch for live automation session
Comment 2 Radar WebKit Bug Importer 2022-06-21 09:12:13 PDT
<rdar://problem/95605569>