通过Selenium WebDriver在浏览器的同一窗口中打开新标签页吗? [英] Opening a new tab in the same window session of the browser through Selenium WebDriver?

查看:978
本文介绍了通过Selenium WebDriver在浏览器的同一窗口中打开新标签页吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过Selenium WebDriver命令在浏览器的同一窗口会话中打开新选项卡?

How to open a new tab in the same window session of the browser through Selenium WebDriver 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 with Java?
  • 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.

这篇关于通过Selenium WebDriver在浏览器的同一窗口中打开新标签页吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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