public virtual async Task <string> Connect(CancellationToken cancellationToken = default(CancellationToken)) { UnsubscribeDevToolsSessionEvent(); DoConnectWhenCheckConnected = false; if (!string.IsNullOrWhiteSpace(UserDir)) { chromeProcess = await OpenChromeProfile(UserDir); } await DevTools.Connect(); SubscribeToDevToolsSessionEvent(); await FrameTracker.Enable(); return($"Connected to Chrome port {Port}"); }