1

We have a selenium IDE script we're converting to python webdriver. The following command did not convert:

[openWindow | http://mywebsite.com/index.php | window1]]

I've searched for the equivalent webdriver command for openWindow, but I haven't found anything. Can someone tell me what the best way is to deal with this command in webdriver?

user202729
  • 3,358
  • 3
  • 25
  • 36
edszr
  • 63
  • 2
  • 10

1 Answers1

1

I am afraid there is no direct alternative in the webdriver API, no way to work with browser tabs reliably (except switching between open tabs through switch_to.window()). Even to open a tab, keyboard shortcuts is the only way, see:

Just instantiate a new driver if you need to open a "new window" and use driver.get() to navigate to a URL.

Community
  • 1
  • 1
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195