new_tab

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

Syntax

py.switch_to.new_tab() -> Pylenium

Usage

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

---or---

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

Arguments

  • None

Yields

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

Last updated