@@ -299,23 +299,20 @@ public void TestApplyHotKey()
299
299
this . CloseFancyZonesEditor ( ) ;
300
300
this . AttachPowertoySetting ( ) ;
301
301
SendKeys ( Key . Win , Key . Ctrl , Key . Alt , Key . Num0 ) ;
302
- Thread . Sleep ( 3 ) ;
303
302
this . AttachFancyZonesEditor ( ) ;
304
303
var element = this . Find < Element > ( layout ) ;
305
304
Assert . IsTrue ( element . Selected , $ "{ element . Selected } Grid custom layout is not visible") ;
306
305
this . CloseFancyZonesEditor ( ) ;
307
306
this . AttachPowertoySetting ( ) ;
308
307
309
308
SendKeys ( Key . Win , Key . Ctrl , Key . Alt , Key . Num1 ) ;
310
- Thread . Sleep ( 3 ) ;
311
309
this . AttachFancyZonesEditor ( ) ;
312
310
element = this . Find < Element > ( "Grid-9" ) ;
313
311
Assert . IsTrue ( element . Selected , $ "{ element . Selected } Grid-9 is not visible") ;
314
312
this . CloseFancyZonesEditor ( ) ;
315
313
this . AttachPowertoySetting ( ) ;
316
314
317
315
SendKeys ( Key . Win , Key . Ctrl , Key . Alt , Key . Num2 ) ;
318
- Thread . Sleep ( 3 ) ;
319
316
this . AttachFancyZonesEditor ( ) ;
320
317
element = this . Find < Element > ( "Canvas custom layout" ) ;
321
318
Assert . IsTrue ( element . Selected , $ "{ element . Selected } Canvas custom layout is not visible") ;
@@ -402,8 +399,9 @@ public void HotKeyWindowFlashTest()
402
399
403
400
int tries = 24 ;
404
401
Pull ( tries , "down" ) ;
405
- this . Find < Group > ( "Enable quick layout switch" ) . Click ( ) ;
406
- var checkbox1 = this . Find < CheckBox > ( "Flash zones when switching layout" ) ;
402
+ var switchGroup = this . Find < Group > ( "Enable quick layout switch" ) ;
403
+ switchGroup . Click ( ) ;
404
+ var checkbox1 = switchGroup . Find < Element > ( "Flash zones when switching layout" ) ;
407
405
if ( checkbox1 . GetAttribute ( "Toggle.ToggleState" ) == "0" )
408
406
{
409
407
checkbox1 . Click ( ) ;
@@ -610,11 +608,12 @@ private void AttachPowertoySetting()
610
608
611
609
private void AttachFancyZonesEditor ( )
612
610
{
613
- Task . Delay ( 1000 ) . Wait ( ) ;
611
+ Task . Delay ( 4000 ) . Wait ( ) ;
614
612
this . Find < Button > ( "Launch layout editor" ) . Click ( ) ;
615
613
616
614
Task . Delay ( 3000 ) . Wait ( ) ;
617
615
this . Session . Attach ( PowerToysModule . FancyZone ) ;
616
+ Task . Delay ( 3000 ) . Wait ( ) ;
618
617
}
619
618
620
619
private void CloseFancyZonesEditor ( )
0 commit comments