@@ -40,21 +40,33 @@ def enter_usecase_name(self, name):
4040 return self # for method chaining
4141
4242 def enter_summary (self , text : str ):
43- # Wait for toast/overlay to disappear before interacting
44- self .wait_for_invisibility ((By .CLASS_NAME , "toast" ), timeout = 5 )
43+ # Try to wait for toast/overlay to disappear, but don't fail if they persist
44+ try :
45+ self .wait_for_invisibility ((By .CLASS_NAME , "toast" ), timeout = 3 )
46+ except TimeoutException :
47+ pass # Continue anyway
48+
4549 fld = self .wait .until (
4650 EC .visibility_of_element_located (CreateUsecaseLocators .USECASE_SUMMARY_INPUT ),
47- message = "Could not find UseCase summary textarea "
51+ message = "Could not find UseCase summary editor "
4852 )
49- fld .clear ()
53+ # For Quill editor (contenteditable div), clear using Ctrl+A then type
54+ fld .click ()
55+ # Ctrl+A works cross-platform (Selenium maps to Cmd+A on Mac)
56+ fld .send_keys (Keys .CONTROL + 'a' )
57+ fld .send_keys (Keys .DELETE )
5058 fld .send_keys (text )
5159 # Send text twice (application-specific behavior)
5260 fld .send_keys (text )
5361 return self
5462
5563 def enter_platform_url (self , url : str ):
56- # Wait for any overlays to disappear
57- self .wait_for_invisibility ((By .CLASS_NAME , "toast" ), timeout = 5 )
64+ # Try to wait for any overlays to disappear, but don't fail if they persist
65+ try :
66+ self .wait_for_invisibility ((By .CLASS_NAME , "toast" ), timeout = 3 )
67+ except TimeoutException :
68+ pass # Continue anyway
69+
5870 fld = self .wait .until (
5971 EC .visibility_of_element_located (CreateUsecaseLocators .PLATFORM_URL_INPUT ),
6072 message = "Could not find Platform Url input"
@@ -73,8 +85,12 @@ def select_tags(self, items: list[str]):
7385
7486 def select_sectors (self , items : list [str ]):
7587 """Select multiple sectors using BasePage utility to eliminate duplication"""
76- # Wait for any toast notifications to disappear before clicking combobox
77- self .wait_for_invisibility ((By .CLASS_NAME , "toast" ), timeout = 5 )
88+ # Try to wait for toast notifications to disappear, but don't fail if they persist
89+ # (toasts don't block interaction with the form)
90+ try :
91+ self .wait_for_invisibility ((By .CLASS_NAME , "toast" ), timeout = 3 )
92+ except TimeoutException :
93+ pass # Continue anyway - toasts don't block interaction
7894
7995 for val in items :
8096 self .select_combobox_option (CreateUsecaseLocators .SECTOR_INPUT , val )
@@ -115,9 +131,14 @@ def enter_started_on(self, iso_date: str):
115131 return self
116132
117133 def select_running_status (self , status_text : str ):
118- self .wait .until (
119- EC .invisibility_of_element_located ((By .CLASS_NAME , "toast" ))
120- )
134+ # Try to wait for toasts to disappear, but don't fail if they persist
135+ try :
136+ self .wait_with_timeout (3 ).until (
137+ EC .invisibility_of_element_located ((By .CLASS_NAME , "toast" ))
138+ )
139+ except TimeoutException :
140+ pass # Continue anyway
141+
121142 select_el = self .wait .until (
122143 EC .presence_of_element_located (CreateUsecaseLocators .RUNNING_STATUS_INPUT ),
123144 message = "Could not find Running Status <select>"
@@ -149,7 +170,8 @@ def get_usecase_name_value(self):
149170 return self .driver .find_element (* CreateUsecaseLocators .USECASE_NAME_INPUT ).get_attribute ("value" )
150171
151172 def get_summary_value (self ):
152- return self .driver .find_element (* CreateUsecaseLocators .SUMMARY_INPUT ).get_attribute ("value" )
173+ # For contenteditable div, use textContent instead of value attribute
174+ return self .driver .find_element (* CreateUsecaseLocators .SUMMARY_INPUT ).text
153175
154176 def get_platform_url_value (self ):
155177 return self .driver .find_element (* CreateUsecaseLocators .PLATFORM_URL_INPUT ).get_attribute ("value" )
0 commit comments