Selenium 可以与现有的浏览器会话交互吗? [英] Can Selenium interact with an existing browser session?

查看:37
本文介绍了Selenium 可以与现有的浏览器会话交互吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道 Selenium(最好是 WebDriver)是否能够与在启动 Selenium 客户端之前已经运行的浏览器进行通信并通过该浏览器进行操作?

Does anybody know if Selenium (WebDriver preferably) is able to communicate with and act through a browser that is already running before launching a Selenium Client?

我的意思是如果 Selenium 能够在不使用 Selenium 服务器的情况下与浏览器通信(例如,可以是手动启动的 Internet Explorer).

I mean if Selenium is able to comunicate with a browser without using the Selenium Server (with could be an Internet Explorer launched manually for example).

推荐答案

这是一个相当古老的功能请求:允许网络驱动程序附加到正在运行的浏览器.所以官方不支持.

This is a pretty old feature request: Allow webdriver to attach to a running browser . So it's officially not supported.

然而,有一些工作代码声称支持这一点:https://web.archive.org/web/20171214043703/http://tarunlalwani.com/post/reusing-existing-browser-session-selenium-java/.

However, there is some working code which claims to support this: https://web.archive.org/web/20171214043703/http://tarunlalwani.com/post/reusing-existing-browser-session-selenium-java/.

这篇关于Selenium 可以与现有的浏览器会话交互吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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