@@ -645,7 +645,9 @@ def test_basic_form(self):
645
645
self .page .locator ("#id_decimal_field" ).type ("0.123" , delay = CLICK_DELAY )
646
646
self .page .locator ("#id_duration_field" ).type ("1" , delay = CLICK_DELAY )
647
647
self .
page .
locator (
"#id_email_field" ).
type (
"[email protected] " ,
delay = CLICK_DELAY )
648
- self .page .locator ("#id_file_path_field" ).select_option ("manage.py" )
648
+ file_path_field_options = self .page .query_selector_all ("#id_file_path_field option" )
649
+ file_path_field_values : list [str ] = [option .get_attribute ("value" ) for option in file_path_field_options ]
650
+ self .page .locator ("#id_file_path_field" ).select_option (file_path_field_values [1 ])
649
651
self .page .locator ("#id_float_field" ).type ("1.2345" , delay = CLICK_DELAY )
650
652
self .page .locator ("#id_generic_ip_address_field" ).type ("127.0.0.1" , delay = CLICK_DELAY )
651
653
self .page .locator ("#id_integer_field" ).type ("123" , delay = CLICK_DELAY )
@@ -662,7 +664,6 @@ def test_basic_form(self):
662
664
self .page .locator ("#id_uuid_field" ).type ("550e8400-e29b-41d4-a716-446655440000" , delay = CLICK_DELAY )
663
665
self .
page .
locator (
"#id_combo_field" ).
type (
"[email protected] " ,
delay = CLICK_DELAY )
664
666
self .page .locator ("#id_password_field" ).type ("password" , delay = CLICK_DELAY )
665
-
666
667
model_choice_field_options = self .page .query_selector_all ("#id_model_multiple_choice_field option" )
667
668
model_choice_field_values : list [str ] = [option .get_attribute ("value" ) for option in model_choice_field_options ]
668
669
self .page .locator ("#id_model_choice_field" ).select_option (model_choice_field_values [0 ])
@@ -741,7 +742,9 @@ def test_bootstrap_form(self):
741
742
self .page .locator ("#id_decimal_field" ).type ("0.123" , delay = CLICK_DELAY )
742
743
self .page .locator ("#id_duration_field" ).type ("1" , delay = CLICK_DELAY )
743
744
self .
page .
locator (
"#id_email_field" ).
type (
"[email protected] " ,
delay = CLICK_DELAY )
744
- self .page .locator ("#id_file_path_field" ).select_option ("manage.py" )
745
+ file_path_field_options = self .page .query_selector_all ("#id_file_path_field option" )
746
+ file_path_field_values : list [str ] = [option .get_attribute ("value" ) for option in file_path_field_options ]
747
+ self .page .locator ("#id_file_path_field" ).select_option (file_path_field_values [1 ])
745
748
self .page .locator ("#id_float_field" ).type ("1.2345" , delay = CLICK_DELAY )
746
749
self .page .locator ("#id_generic_ip_address_field" ).type ("127.0.0.1" , delay = CLICK_DELAY )
747
750
self .page .locator ("#id_integer_field" ).type ("123" , delay = CLICK_DELAY )
0 commit comments