Selenium无头选项中的SER SYSTEM VPN(PPTP VPN)
我有一个系统VPN(我正在使用PPTP协议),并且将使用Selenium测试我们的网站,但是由于只有内部用户可以不使用VPN访问该网站,因此我无法访问该网站进行测试。当我在GUI模式下使用Selenium(不是无头)时,它可以正常工作而没有任何问题,但是当我使用此命令切换到无头模式时:
chrome_options = Options()
chrome_options.add_argument("--headless")
我会遇到错误,因为我的VPN在无头模式下不起作用。有什么方法可以在Selenium中使用并将我的VPN设置为无头模式?
I have a system VPN (I am using pptp protocol) and I am going to use Selenium to test our website, but since only internal users are able to access that website without using a VPN, I cannot access the website to test. When I am using Selenium in GUI mode (not headless) it works fine without any problems but when I switch to headless mode using this command:
chrome_options = Options()
chrome_options.add_argument("--headless")
I get an error because my VPN does not work in the headless mode. Is there any way to use and set my VPN in headless mode in Selenium?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论