ChromeGetWindows


 

ChromeGetWindows>session_id,window_handles

 

Retrieves an array of windows/tabs belonging to the specified Chrome session. Requires a session_id created by ChromeStart.  
 


 

See also: Chrome Functions

 

Example

 

Let>CHROMEDRIVER_EXE=c:\chromedriver.exe


 

//start a chrome session

ChromeStart>session_id


 

//navigate to google.com

ChromeNavigate>session_id,url,https://www.w3schools.com/jsref/met_win_open.asp


 

//Click on accept

ChromeFindElements>session_id,id,accept-choices,elements

ChromeElementAction>session_id,elements_1,click


 

Wait>1

//clicking on Try it yourself will create a new tab

ChromeFindElements>session_id,link text,Try it Yourself �,elements

ChromeElementAction>session_id,elements_1,click


 

Wait>1


 

//find the new tab handle (it's window 2) and switch to it

ChromeGetWindows>session_id,window_list

ChromeSwitchWindow>session_id,window_list_2,result


 

//now click on the menu button on the new tab

ChromeFindElements>session_id,id,menuButton,allAs

ChromeElementAction>session_id,allAs_1,click