如何解决我需要将代码转换为 VB.net在使用 firefoxdriver 检测站点时隐藏 Selenium
我正在使用 Selenium 和 Firefoxdriver 在 VB.net 上开发一个机器人。 我想从网站上隐藏 webdriver 的可见性,但我没有通过 Firefox 获得它。 我已经设法用 chromedriver 做到了,但我受到了限制,因为它不会在文本中发送 EMOJIS。 我需要帮助将本主题 https://stackoverflow.com/a/60252464/15502676 中使用的代码转换为 VB.net。 我会在那里问,但我没有这样做的声誉。 如果我有什么遗漏,请问我! 非常感谢各位朋友。
profile = webdriver.FirefoxProfile('C:\\Users\\You\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\something.default-release')
PROXY_HOST = "12.12.12.123"
PROXY_PORT = "1234"
profile.set_preference("network.proxy.type",1)
profile.set_preference("network.proxy.http",PROXY_HOST)
profile.set_preference("network.proxy.http_port",int(PROXY_PORT))
profile.set_preference("dom.webdriver.enabled",False)
profile.set_preference('useAutomationExtension',False)
profile.update_preferences()
desired = DesiredCapabilities.FIREFOX
driver = webdriver.Firefox(firefox_profile=profile,desired_capabilities=desired)
文中如有错误请见谅,我用了翻译器。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。