
    >i?	                    l    d dl mZ d dlmZmZ d dlmZ d dlmZm	Z	 erd dlm
Z
 d dlmZ  G d d      Zy	)
    )annotations)TYPE_CHECKINGOptional)Command)EmulationMethodSetUserAgentOverrideParams)SetUserAgentOverrideCommand)UserAgentMetadatac                  <    e Zd ZdZe	 	 	 d	 	 	 	 	 	 	 	 	 dd       Zy)EmulationCommandsa^  
    Implementation of Chrome DevTools Protocol for the Emulation domain.

    This class provides commands for emulating different environments,
    including user agent overrides, device metrics, and other browser
    characteristics useful for testing and automation.

    See https://chromedevtools.github.io/devtools-protocol/tot/Emulation/
    Nc                z    t        |       }|||d<   |||d<   |||d<   t        t        j                  |      S )ar  
        Overrides the browser's User-Agent string via the Emulation domain.

        This is the canonical CDP method for User-Agent override. It modifies
        both HTTP headers and navigator JavaScript properties, ensuring
        consistency between all layers.

        When userAgentMetadata is provided, Client Hint headers (Sec-CH-UA-*)
        will also be sent consistently with the overridden User-Agent.

        Args:
            user_agent: Complete User-Agent string to use.
            accept_language: Browser language preference (e.g., 'en-US,en;q=0.9').
            platform: Value for navigator.platform (e.g., 'Win32', 'MacIntel').
            user_agent_metadata: Client Hints metadata for Sec-CH-UA-* headers
                and navigator.userAgentData.

        Returns:
            SetUserAgentOverrideCommand: CDP command to override user agent.
        )	userAgentacceptLanguageplatformuserAgentMetadata)methodparams)r   r   r   SET_USER_AGENT_OVERRIDE)
user_agentaccept_languager   user_agent_metadatar   s        h/var/www/python/tenders/Scrapper/venv/lib/python3.12/site-packages/pydoll/commands/emulation_commands.pyset_user_agent_overridez)EmulationCommands.set_user_agent_override   sS    6 ,jA&'6F#$!)F:**=F&'oEEfUU    )NNN)
r   strr   Optional[str]r   r   r   zOptional[UserAgentMetadata]returnr	   )__name__
__module____qualname____doc__staticmethodr    r   r   r   r      s[      *."&;?	!V!V&!V  !V 9	!V
 
%!V !Vr   r   N)
__future__r   typingr   r   pydoll.protocol.baser   !pydoll.protocol.emulation.methodsr   r   r	   pydoll.protocol.emulation.typesr
   r   r#   r   r   <module>r)      s*    " * (
 MA-V -Vr   