@@ -293,11 +293,7 @@ func TestLocator(t *testing.T) {
293293 {
294294 "PressSequentially" , func (_ * testBrowser , p * common.Page ) {
295295 lo := p .Locator ("#inputText" , nil )
296-
297- //For input clearance if something is present by default
298296 require .NoError (t , lo .Clear (common .NewFrameFillOptions (lo .Timeout ())))
299-
300- // Testing pressSequentially
301297 require .NoError (t , lo .PressSequentially ("hello" , nil ))
302298
303299 inputValue , err := p .InputValue ("#inputText" , common .NewFrameInputValueOptions (p .MainFrame ().Timeout ()))
@@ -308,21 +304,16 @@ func TestLocator(t *testing.T) {
308304 {
309305 "PressSequentiallyWithDelay" , func (tb * testBrowser , p * common.Page ) {
310306 lo := p .Locator ("#inputText" , nil )
311-
312- //Clear the input
313307 require .NoError (t , lo .Clear (common .NewFrameFillOptions (lo .Timeout ())))
314-
315- //Create options with delay
316308 opts := tb .toSobekValue (map [string ]any {
317309 "delay" : int64 (100 ),
318310 })
319-
320311 start := time .Now ()
321312 require .NoError (t , lo .PressSequentially ("text" , opts ))
322313 duration := time .Since (start )
323314
324- // "text" has 4 characters and 3 delays between them.
325- // it should wait at least 300ms.
315+ // "text" has 4 character and 3 delay between them .
316+ // It should wait atleast 300ms.
326317 require .GreaterOrEqual (t , duration .Milliseconds (), int64 (300 ))
327318
328319 inputValue , err := p .InputValue ("#inputText" , common .NewFrameInputValueOptions (p .MainFrame ().Timeout ()))
@@ -333,13 +324,8 @@ func TestLocator(t *testing.T) {
333324 {
334325 "PressSequentiallyInTextArea" , func (_ * testBrowser , p * common.Page ) {
335326 lo := p .Locator ("textarea" , nil )
336-
337- //Clear textarea first
338327 require .NoError (t , lo .Clear (common .NewFrameFillOptions (lo .Timeout ())))
339-
340- //Test in textArea
341328 require .NoError (t , lo .PressSequentially ("multi line" , nil ))
342-
343329 inputValue , err := p .InputValue ("textArea" , common .NewFrameInputValueOptions (p .MainFrame ().Timeout ()))
344330 require .NoError (t , err )
345331 require .Equal (t , "multi line" , inputValue )
0 commit comments