private void ChangeTargetInfo(TargetTargetInfoChangedChromiumEvent e)
        {
            if (!TargetsMap.ContainsKey(e.TargetInfo.TargetId))
            {
                throw new PlaywrightSharpException("Target should exists before ChangeTargetInfo");
            }

            var target = TargetsMap[e.TargetInfo.TargetId];

            target.TargetInfoChanged(e.TargetInfo);
        }
        private void TargetInfoChanged(TargetTargetInfoChangedChromiumEvent e)
        {
            if (!TargetsMap.TryGetValue(e.TargetInfo.TargetId, out var target))
            {
                throw new PlaywrightSharpException("Target should exists before ChangeTargetInfo");
            }

            string previousUrl    = target.Url;
            bool   wasInitialized = target.IsInitialized;

            target.TargetInfoChanged(e.TargetInfo);

            if (wasInitialized && previousUrl != target.Url)
            {
                TargetChanged?.Invoke(this, new TargetChangedArgs {
                    Target = target
                });
            }
        }