【问题标题】:How can I use the browser with python without Selenium [closed]如何在没有 Selenium 的情况下使用带有 python 的浏览器 [关闭]
【发布时间】:2021-11-01 09:00:03
【问题描述】:

我正在寻找一种控制普通网络浏览器的方法(导入网络浏览器)。我已经使用硒工作了几个月,但想在没有硒的情况下工作 不幸的是,没有这方面的文档,或者这不可能吗?

【问题讨论】:

  • “普通网络浏览器”你是什么意思? Chrome、firefox、explorer、edge、duckduckgo等都是“普通”的浏览器。你到底想做什么? minimal reproducible example 会有所帮助
  • 浏览器无关紧要,我目前正在使用 Chrome 和 Firefox 进行自动化,将 Selenium 作为一个模块,但我想使用这个模块 docs.python.org/3/library/webbrowser.html 而不必再次访问 selenium不得不,我想知道如何在这个符号中输入类,id或xpath以便输入用户或密码,例如

标签: python google-chrome firefox browser automation


【解决方案1】:

如果你使用 python,你可以使用 pyautogui。 要安装它,请使用:pip install pyautogui 要将其导入您的代码:import pyautogui pyautogui 文档:https://pyautogui.readthedocs.io/en/latest/

【讨论】:

  • 请添加更多详细信息以扩展您的答案,例如工作代码或文档引用。
  • @Community 这样好吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-09-19
  • 1970-01-01
  • 2023-03-09
  • 1970-01-01
  • 2020-10-22
  • 2011-02-04
相关资源
最近更新 更多