mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:42:43 +00:00 
			
		
		
		
	WebDriver: Mark current window handle as invalid after close_window()
This commit is contained in:
		
							parent
							
								
									2b3bc2654f
								
							
						
					
					
						commit
						bc87a48e0b
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -119,7 +119,7 @@ Web::WebDriver::Response Session::close_window() | ||||||
| { | { | ||||||
|     { |     { | ||||||
|         // Defer removing the window handle from this session until after we know we are done with its connection.
 |         // Defer removing the window handle from this session until after we know we are done with its connection.
 | ||||||
|         ScopeGuard guard { [this] { m_windows.remove(m_current_window_handle); } }; |         ScopeGuard guard { [this] { m_windows.remove(m_current_window_handle); m_current_window_handle = "NoSuchWindowPleaseSelectANewOne"_string; } }; | ||||||
| 
 | 
 | ||||||
|         // 3. Close the current top-level browsing context.
 |         // 3. Close the current top-level browsing context.
 | ||||||
|         TRY(web_content_connection().close_window()); |         TRY(web_content_connection().close_window()); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andrew Kaster
						Andrew Kaster