browser.window.handle#
Functions#
all(selenium=False)
#
Get list of IDs of all open tabs or windows.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
selenium | bool | Set to | False |
Returns:
Type | Description |
---|---|
list[str] | List of IDs of all open tabs or windows. |
Example
window_handles = browser.window.handle.all()
count(selenium=False)
#
Count number of open tabs or windows.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
selenium | bool | Set to | False |
Returns:
Type | Description |
---|---|
int | Number of open tabs or windows. |
Example
sum_of_window_handles = browser.window.handle.count()
current()
#
Get the ID of the current tab or window.
Returns:
Type | Description |
---|---|
str | ID of the current tab or window. e.g. |
Example
current_window_handle = browser.window.handle.current()