new_window

The command to open a new browser window and switch to it.

Syntax

py.switch_to.new_window() -> Pylenium

Usage

correct usage
# Open a new window and hold it in a variable
window = py.switch_to.new_window()

---or---

# Open a new window and chain a command
py.switch_to.new_window().visit("https://qap.dev")

Arguments

  • None

index=0 will switch to the default content

Yields

  • Pylenium - The current instance of Pylenium so you can chain commands in the new window

Last updated