3

我目前正在尝试使我公司的流程自动化(我是实习生),并且到目前为止已完成以下工作:

import webbrowser

command_center_url = 'http://docs.python.org/'

# MacOS
chrome_path = 'open -a /Applications/Google\ Chrome.app %s'

# Windows
# chrome_path = 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe %s'

# Linux
# chrome_path = '/usr/bin/google-chrome %s'

webbrowser.get(chrome_path).open(command_center_url)
webbrowser.get(chrome_path).open_new_tab(command_center_url)
webbrowser.get(chrome_path).open_new_tab(command_center_url)
webbrowser.get(chrome_path).open_new_tab(command_center_url)
webbrowser.get(chrome_path).open_new_tab(command_center_url)
webbrowser.get(chrome_path).open_new_tab(command_center_url)
webbrowser.get(chrome_path).open_new_tab(command_center_url)
webbrowser.get(chrome_path).open_new_tab(command_center_url)
webbrowser.get(chrome_path).open_new_tab(command_center_url)

现在,我想检测 Chrome 具有的某个插件,它将在多个屏幕上重新定位它。请告知如何前进。在此先感谢您的帮助。

编辑:在网上扫描更多答案后,我发现 Selium 是最好的选择。但是,正如您可以想象的那样,由于安全限制,我将无法加载外部包(webdriver)。有什么办法可以用“老式方式”做到这一点?

4

0 回答 0