+
    Sj$                     $   ^ RI Ht ^ RIHt ^ RIHtHt ^ RIHt ^ RI	H
t
 ^ RIHt Rt]! RR	/R
7      ]! R]
P                  .R]
P                   .R]
P                   .R]
P                   .R]
P                   ./R7       ! R R]]4      4       4       tR# )    )contextmanager)StaticLiveServerTestCase)modify_settingsoverride_settings)SeleniumTestCase)CSP)gettextTappendz5django.middleware.csp.ContentSecurityPolicyMiddleware)
MIDDLEWAREzdefault-srczconnect-srczimg-srcz
script-srcz	style-src)
SECURE_CSPc                      a a ] tR t^t o. ROtV 3R ltRR ltRR ltRR ltRR lt	RR lt
RR ltRR ltRR	 lt]RR
 l4       tR tRR ltR tR tRR ltR tR tR tR tRtVtV ;t# )AdminSeleniumTestCasec                h   < V P                  V P                  R R7      . 4       \        SV `  4        R# )security)sourceN)assertEqualget_browser_logssupertearDown)self	__class__s   &O/var/www/idalgo/venv/lib/python3.14/site-packages/django/contrib/admin/tests.pyr   AdminSeleniumTestCase.tearDown"   s,    ..j.A2F    c                V    ^ RI Hp V! V P                  V4      P                  V4       R# )z
Block the execution of the tests until the specified callback returns a
value that is not falsy. This method can be called, for example, after
clicking a link or submitting a form. See the other public methods that
call this function for more details.
)WebDriverWaitN)selenium.webdriver.support.waitr   seleniumuntil)r   callbacktimeoutr   s   &&& r   
wait_until AdminSeleniumTestCase.wait_until'   s!     	BdmmW-33H=r   c                   a V P                  V3R lV4       V P                  P                  P                  V P                  P                  R,          4       V P                  4        R# )z
Block until `num_windows` are present and are ready (usually 2, but can
be overridden in the case of pop-ups opening other pop-ups). Switch the
current window to the new pop-up.
c                 4   < \        V P                  4      S8H  # N)lenwindow_handles)dnum_windowss   &r   <lambda>DAdminSeleniumTestCase.wait_for_and_switch_to_popup.<locals>.<lambda>8   s    #a&6&6"7;"Fr   N)r"   r   	switch_towindowr(   wait_page_ready)r   r*   r!   s   &f&r   wait_for_and_switch_to_popup2AdminSeleniumTestCase.wait_for_and_switch_to_popup2   sG     	FP&&t}}'C'CB'GHr   c                x    ^ RI Hp ^ RIHp V P	                  VP                  VP                  V34      V4       R# )z2
Block until a CSS selector is found on the page.
Byexpected_conditionsN)selenium.webdriver.common.byr5   selenium.webdriver.supportr7   r"   presence_of_element_locatedCSS_SELECTORr   css_selectorr!   r5   ecs   &&&  r   wait_forAdminSeleniumTestCase.wait_for<   s/     	4H**BOO\+JKW	
r   c                z    ^ RI Hp ^ RIHp V P	                  VP                  VP                  V3V4      V4       R# )z4
Block until the text is found in the CSS selector.
r4   r6   N)r8   r5   r9   r7   r"   text_to_be_present_in_elementr;   r   r=   textr!   r5   r>   s   &&&&  r   wait_for_text#AdminSeleniumTestCase.wait_for_textG   s2     	4H,,boo|-LdS	
r   c                z    ^ RI Hp ^ RIHp V P	                  VP                  VP                  V3V4      V4       R# )z5
Block until the value is found in the CSS selector.
r4   r6   N)r8   r5   r9   r7   r"   #text_to_be_present_in_element_valuer;   rC   s   &&&&  r   wait_for_value$AdminSeleniumTestCase.wait_for_valueS   s7     	4H22,/ 		
r   c                x    ^ RI Hp ^ RIHp V P	                  VP                  VP                  V34      V4       R# )zC
Block until the element described by the CSS selector is visible.
r4   r6   N)r8   r5   r9   r7   r"   visibility_of_element_locatedr;   r<   s   &&&  r   wait_until_visible(AdminSeleniumTestCase.wait_until_visiblea   s/     	4H,,boo|-LMw	
r   c                x    ^ RI Hp ^ RIHp V P	                  VP                  VP                  V34      V4       R# )zE
Block until the element described by the CSS selector is invisible.
r4   r6   N)r8   r5   r9   r7   r"   invisibility_of_element_locatedr;   r<   s   &&&  r   wait_until_invisible*AdminSeleniumTestCase.wait_until_invisiblel   s0     	4H../NOQX	
r   c                ,    V P                  R V4       R# )z 
Block until the page is ready.
c                 *    V P                  R 4      R8H  # )zreturn document.readyState;complete)execute_script)drivers   &r   r+   7AdminSeleniumTestCase.wait_page_ready.<locals>.<lambda>|   s    6001NOr   N)r"   )r   r!   s   &&r   r0   %AdminSeleniumTestCase.wait_page_readyw   s     		
r   c              #  
  "   ^ RI Hp ^ RIHp ^ RIHp V P                  P                  VP                  R4      pRx   V P                  VP                  V4      VR7       V P                  VR7       R#   T d     Li ; i5i)z1
Block until a new page has loaded and is ready.
)WebDriverExceptionr4   r6   htmlN)r!   )selenium.common.exceptionsr[   r8   r5   r9   r7   r   find_elementTAG_NAMEr"   staleness_ofr0   )r   r!   r[   r5   r>   old_pages   &&    r   wait_page_loaded&AdminSeleniumTestCase.wait_page_loaded   st     
 	B3H==--bkk6B	OOBOOH5wOG 	W- " 	 		s)   =B "A6 "B6B =B?B  Bc                F   V P                   P                  4       R ,          pV P                   P                  4       R,          pV P                   P                  V^,           V4       V P                  4        V P                   P                  W4       V P                  4        R# )widthheightN)r   get_window_sizeset_window_sizer0   )r   re   rf   s   &  r   trigger_resize$AdminSeleniumTestCase.trigger_resize   sr    --/8..0:%%eai8%%e4r   c                :   ^ RI Hp V P                  P                  V P                  : V: 24       V P                  P                  VP                  R4      pVP                  V4       V P                  P                  VP                  R4      pVP                  V4       \        R4      pV P                  4       ;_uu_ 4        V P                  P                  VP                  RV,          4      P                  4        RRR4       R#   + '       g   i     R# ; i)z
Log in to the admin.
r4   usernamepasswordzLog inz//input[@value="%s"]N)r8   r5   r   getlive_server_urlr^   NAME	send_keys_rb   XPATHclick)r   rl   rm   	login_urlr5   username_inputpassword_input
login_texts   &&&&    r   admin_login!AdminSeleniumTestCase.admin_login   s     	4D$8$8)DE33BGGZH  *33BGGZH  *x[
""$$MM&&0:=eg %$$$s   <D		D	c                    ^ RI Hp ^ RIHp V! V P                  P                  VP                  V4      4      pVP                  V4       R# )zr
Select the <OPTION> with the value `value` inside the <SELECT> widget
identified by the CSS selector `selector`.
r4   SelectN)r8   r5   selenium.webdriver.support.uir}   r   r^   r;   select_by_valuer   selectorvaluer5   r}   selects   &&&   r   select_option#AdminSeleniumTestCase.select_option   s7    
 	48222??HMNu%r   c                    ^ RI Hp ^ RIHp V! V P                  P                  VP                  V4      4      pVP                  V4       R# )zt
Deselect the <OPTION> with the value `value` inside the <SELECT> widget
identified by the CSS selector `selector`.
r4   r|   N)r8   r5   r~   r}   r   r^   r;   deselect_by_valuer   s   &&&   r   deselect_option%AdminSeleniumTestCase.deselect_option   s7    
 	48222??HMN  'r   c                    ^ RI Hp T;'       g    V P                  pV P                  \	        VP                  VP                  V4      4      V4       R# )zh
Assert number of matches for a CSS selector.

`root_element` allow restriction to a pre-selected node.
r4   N)r8   r5   r   r   r'   find_elementsr;   )r   r   countroot_elementr5   s   &&&& r   assertCountSeleniumElements1AdminSeleniumTestCase.assertCountSeleniumElements   sA     	4#44t}}**2??HEF	
r   c                  aa ^ RI Ho V'       de   V P                  P                  SP                  S4      p. pV F#  pVP                  VP                  R4      4       K%  	  V P                  W$4       R# V P                  4       ;_uu_ 4        V P                  VV3R l4       RRR4       R#   + '       g   i     R# ; i)r   r4   r   c                 F   < V P                  SP                  S4      '       * # r&   )r   r;   )rW   r5   options_selectors   &r   r+   <AdminSeleniumTestCase._assertOptionsValues.<locals>.<lambda>   s    v';';)9( $r   N)
r8   r5   r   r   r;   r
   get_attributer   disable_implicit_waitr"   )r   r   valuesoptionsactual_valuesoptionr5   s   &f&   @r   _assertOptionsValues*AdminSeleniumTestCase._assertOptionsValues   s    3mm11"//CSTGM!$$V%9%9'%BC "V3
 ++-- .---s   B..B?	c                8    V P                  RV,          V4       R# )zc
Assert that the <SELECT> widget identified by `selector` has the
options with the given `values`.
z%s > optionNr   r   r   r   s   &&&r   assertSelectOptions)AdminSeleniumTestCase.assertSelectOptions   s    
 	!!-(":FCr   c                8    V P                  RV,          V4       R# )zl
Assert that the <SELECT> widget identified by `selector` has the
selected options with the given `values`.
z%s > option:checkedNr   r   s   &&&r   assertSelectedOptions+AdminSeleniumTestCase.assertSelectedOptions   s    
 	!!"7("BFKr   c                ~    ^ RI Hp V P                  P                  VP                  V4      P                  R4      R8H  # )zS
Return True if the element identified by `selector` has the `disabled`
attribute.
r4   disabledtrue)r8   r5   r   r^   r;   r   )r   r   r5   s   && r   is_disabled!AdminSeleniumTestCase.is_disabled   s>    
 	4 MM&&rAOO 	
r    )zdjango.contrib.adminzdjango.contrib.authzdjango.contrib.contenttypeszdjango.contrib.sessionszdjango.contrib.sites)
   )   r   )z/admin/r&   )__name__
__module____qualname____firstlineno__available_appsr   r"   r1   r?   rE   rI   rM   rQ   r0   r   rb   ri   ry   r   r   r   r   r   r   r   __static_attributes____classdictcell____classcell__)r   __classdict__s   @@r   r   r      s     N
	>	



	
	

 . .*"	&	(
(DL
 
r   r   N)
contextlibr   "django.contrib.staticfiles.testingr   django.testr   r   django.test.seleniumr   django.utils.cspr   django.utils.translationr	   rr   
__unittestNONESELFr   r   r   r   <module>r      s    % G : 1   1 
 QR zzCHH:sxxjchhZh
,.F h
h
r   