@@ -43,15 +43,16 @@ public void FrameSwitchToNonexistantFrameThrowsTest()
4343
4444
4545 [ Test ]
46- [ Category ( Category . VERYSLOW ) ]
46+ [ Category ( Category . SLOW ) ]
4747 public void WindowSwitchTest ( )
4848 {
4949 SwitchPage . Go ( ) ;
5050
5151 I . Click ( SwitchPage . NewWindowSelector ) ;
5252
53- I . Switch . Window ( "Inputs - Draki Testbed" )
54- . Assert . Text ( "Input Controls Testbed" ) . In ( "h2" ) ;
53+ I . Switch . Window ( "Inputs - FluentAutomation Testbed" ) ;
54+
55+ I . Assert . Text ( "Input Controls Testbed" ) . In ( "h2" ) ;
5556
5657 I . Switch . Window ( )
5758 . Assert . Text ( "Switch Testbed" ) . In ( "h2" ) ;
@@ -61,8 +62,54 @@ public void WindowSwitchTest()
6162
6263 I . Switch . Window ( )
6364 . Assert . Text ( "Switch Testbed" ) . In ( "h2" ) ;
65+ }
66+
67+ [ Test ]
68+ [ Category ( Category . SLOW ) ]
69+ public void WindowSwitchToTitleContainingTest ( )
70+ {
71+ SwitchPage . Go ( ) ;
72+
73+ I . Click ( SwitchPage . NewWindowSelector ) ;
74+
75+ I . Switch . Window ( "Inputs - Flue" ) ;
76+ I . Assert . Text ( "Input Controls Testbed" ) . In ( "h2" ) ;
77+ }
6478
79+ [ Test ]
80+ [ Category ( Category . SLOW ) ]
81+ public void WindowSwitchToUrlContainingTest ( )
82+ {
83+ SwitchPage . Go ( ) ;
84+
85+ I . Click ( SwitchPage . NewWindowSelector ) ;
86+
87+ I . Switch . Window ( "/Inp" ) ;
88+ I . Assert . Text ( "Input Controls Testbed" ) . In ( "h2" ) ;
89+ }
90+
91+ [ Test ]
92+ [ Category ( Category . VERYSLOW ) ]
93+ public void WindowSwitchToNonExistentThrowsTest ( )
94+ {
95+ SwitchPage . Go ( ) ;
6596 Assert . Throws < FluentException > ( ( ) => I . Switch . Window ( "non existent window" ) ) ;
6697 }
98+
99+ [ Test ]
100+ public void SwitchToPopupTest ( )
101+ {
102+ SwitchPage . Go ( ) ;
103+
104+ I . Expect . Text ( "Switch Testbed" ) . In ( "h2" ) ;
105+ // open pop up
106+ I . Click ( SwitchPage . new_popup ) ;
107+
108+ I . Switch . Window ( "Inputs" ) . Expect . Text ( "Inputs - FluentAutomation Testbed" ) . In ( "head > title" ) ;
109+ I . Enter ( "can you see me" ) . In ( InputsPage . TextControlSelector ) ;
110+
111+ // switch back to primary window
112+ I . Switch . Window ( ) . Expect . Text ( "Switch Testbed" ) . In ( "h2" ) ;
113+ }
67114 }
68115}
0 commit comments