@@ -5754,6 +5754,7 @@ def test_prepopulated_fields(self):
57545754 and with stacked and tabular inlines.
57555755 Refs #13068, #9264, #9983, #9784.
57565756 """
5757+ from selenium .webdriver import ActionChains
57575758 from selenium .webdriver .common .by import By
57585759
57595760 self .admin_login (
@@ -5766,6 +5767,8 @@ def test_prepopulated_fields(self):
57665767
57675768 # Main form ----------------------------------------------------------
57685769 self .selenium .find_element (By .ID , "id_pubdate" ).send_keys ("2012-02-18" )
5770+ status = self .selenium .find_element (By .ID , "id_status" )
5771+ ActionChains (self .selenium ).move_to_element (status ).click (status ).perform ()
57695772 self .select_option ("#id_status" , "option two" )
57705773 self .selenium .find_element (By .ID , "id_name" ).send_keys (
57715774 " the mAin nÀMë and it's awεšomeıııİ"
@@ -5784,6 +5787,10 @@ def test_prepopulated_fields(self):
57845787 self .selenium .find_element (
57855788 By .ID , "id_relatedprepopulated_set-0-pubdate"
57865789 ).send_keys ("2011-12-17" )
5790+ status = self .selenium .find_element (
5791+ By .ID , "id_relatedprepopulated_set-0-status"
5792+ )
5793+ ActionChains (self .selenium ).move_to_element (status ).click (status ).perform ()
57875794 self .select_option ("#id_relatedprepopulated_set-0-status" , "option one" )
57885795 self .selenium .find_element (
57895796 By .ID , "id_relatedprepopulated_set-0-name"
@@ -5815,6 +5822,10 @@ def test_prepopulated_fields(self):
58155822 self .selenium .find_element (
58165823 By .ID , "id_relatedprepopulated_set-1-pubdate"
58175824 ).send_keys ("1999-01-25" )
5825+ status = self .selenium .find_element (
5826+ By .ID , "id_relatedprepopulated_set-1-status"
5827+ )
5828+ ActionChains (self .selenium ).move_to_element (status ).click (status ).perform ()
58185829 self .select_option ("#id_relatedprepopulated_set-1-status" , "option two" )
58195830 self .selenium .find_element (
58205831 By .ID , "id_relatedprepopulated_set-1-name"
@@ -5838,10 +5849,10 @@ def test_prepopulated_fields(self):
58385849
58395850 # Tabular inlines ----------------------------------------------------
58405851 # Initial inline
5841- element = self .selenium .find_element (
5852+ status = self .selenium .find_element (
58425853 By .ID , "id_relatedprepopulated_set-2-0-status"
58435854 )
5844- self .selenium . execute_script ( "window.scrollTo(0, %s);" % element . location [ "y" ] )
5855+ ActionChains ( self .selenium ). move_to_element ( status ). click ( status ). perform ( )
58455856 self .selenium .find_element (
58465857 By .ID , "id_relatedprepopulated_set-2-0-pubdate"
58475858 ).send_keys ("1234-12-07" )
@@ -5872,6 +5883,10 @@ def test_prepopulated_fields(self):
58725883 self .selenium .find_element (
58735884 By .ID , "id_relatedprepopulated_set-2-1-pubdate"
58745885 ).send_keys ("1981-08-22" )
5886+ status = self .selenium .find_element (
5887+ By .ID , "id_relatedprepopulated_set-2-1-status"
5888+ )
5889+ ActionChains (self .selenium ).move_to_element (status ).click (status ).perform ()
58755890 self .select_option ("#id_relatedprepopulated_set-2-1-status" , "option one" )
58765891 self .selenium .find_element (
58775892 By .ID , "id_relatedprepopulated_set-2-1-name"
@@ -5898,6 +5913,8 @@ def test_prepopulated_fields(self):
58985913 # Initial inline.
58995914 row_id = "id_relatedprepopulated_set-4-0-"
59005915 self .selenium .find_element (By .ID , f"{ row_id } pubdate" ).send_keys ("2011-12-12" )
5916+ status = self .selenium .find_element (By .ID , f"{ row_id } status" )
5917+ ActionChains (self .selenium ).move_to_element (status ).click (status ).perform ()
59015918 self .select_option (f"#{ row_id } status" , "option one" )
59025919 self .selenium .find_element (By .ID , f"{ row_id } name" ).send_keys (
59035920 " sŤāÇkeð inline ! "
@@ -5917,6 +5934,8 @@ def test_prepopulated_fields(self):
59175934 )[3 ].click ()
59185935 row_id = "id_relatedprepopulated_set-4-1-"
59195936 self .selenium .find_element (By .ID , f"{ row_id } pubdate" ).send_keys ("1999-01-20" )
5937+ status = self .selenium .find_element (By .ID , f"{ row_id } status" )
5938+ ActionChains (self .selenium ).move_to_element (status ).click (status ).perform ()
59205939 self .select_option (f"#{ row_id } status" , "option two" )
59215940 self .selenium .find_element (By .ID , f"{ row_id } name" ).send_keys (
59225941 " now you haVe anöther sŤāÇkeð inline with a very loooong "
0 commit comments