打开一个新标签在浏览器中的同一窗口会话通过网络硒驱动程序命令? [英] Opening a new tab in the same window session of the browser through selenium web driver command?

查看:176
本文介绍了打开一个新标签在浏览器中的同一窗口会话通过网络硒驱动程序命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在浏览器中的同一窗口会话通过网络硒驱动程序命令打开一个新标签?

How to open a new tab in the same window session of the browser through selenium web driver command?

推荐答案

在同一个浏览器窗口中打开一个新的标签是可能的,看到的解决方案适用于Firefox:

Opening a new tab in the same browser window is possible, see solutions for Firefox:

  • How to open a new tab using Selenium WebDriver?
  • Controlling firefox tabs in selenium

问题是 - 一旦你打开了一个标签,没有内置在标签页之间切换简便的方法。硒只需不会为提供API。

The problem is - once you've opened a tab, there is no built-in easy way to switch between tabs. Selenium simply doesn't provide an API for that.

而不是一个选项卡,打开一个新的浏览器窗口。

Instead of a tab, open a new browser window.

这篇关于打开一个新标签在浏览器中的同一窗口会话通过网络硒驱动程序命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆