Python Selenium Firefox启动,但不打开任何URL

Python Selenium Firefox启动,但不打开任何URL,python,firefox,selenium,selenium-webdriver,Python,Firefox,Selenium,Selenium Webdriver,我使用的是python版本的selenium from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.keys import Keys import time from selenium.webdriver.common.action_chains import ActionChains from sele

我使用的是python版本的selenium

from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
import time
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
import selenium.webdriver.support.ui as ui
from selenium.webdriver.common.keys import Keys
fp = webdriver.FirefoxProfile("C:\\Users\\%user%\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\fyet0w0h.default")
browser = webdriver.Firefox(firefox_profile=fp)
browser.get("https://helloworld.com/")
firefox驱动程序已打开,但我无法使用browser.get加载任何url(“url”)。没有代理。Python 3.2 Firefox 31


欢迎提供任何帮助。

WebDriver支持以下浏览器和操作系统:

  • 谷歌Chrome 12.0.712.0+
  • Internet Explorer 6、7、8、9、32位和64位版本
  • Firefox 3.0、3.5、3.6、4.0、5.0、6、7、8、9
  • 歌剧院11.5+
  • HtmlUnit 2.9
  • Android-2.3+适用于手机和平板电脑(设备和模拟器)
  • iOS 3+适用于手机(设备和模拟器),3.2+适用于平板电脑(设备和模拟器)

我下载了FF 9.0.1,它成功了,

降级到FF 9不是一个解决方案。因为FF将自动升级,应用程序需要在升级版本中进行测试。如果要求仅在FF 25-FF 27上进行测试,该怎么办? 我们必须检查url未加载的原因。 首先尝试下载Selenium standalone webdriver的最新jar。 请检查您的windows是64位还是32位计算机
根据这个下载jar

需要升级selenium,如果您使用的是最新版本的Firefox,则应使用最新版本的selenium

from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
import time
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
import selenium.webdriver.support.ui as ui
from selenium.webdriver.common.keys import Keys
fp = webdriver.FirefoxProfile("C:\\Users\\%user%\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\fyet0w0h.default")
browser = webdriver.Firefox(firefox_profile=fp)
browser.get("https://helloworld.com/")
对于Python,输入以下命令

pip install -U selenium

对于Java,删除旧jar并从这里下载最新版本,然后附加到构建路径中。它会找到工作的。很高兴使用Firefox进行测试

可能错误的selenium版本/Firefox版本组合它在不传入Firefox配置文件的情况下工作吗?另外,如果设置日志记录,您是否看到任何错误?这实在是太模糊了,无法按原样回答。我们需要您提供更多详细信息,包括堆栈跟踪、错误消息或类似信息。这很可能是一个配置问题,如果没有这些问题,任何潜在的解决方案都只是猜测。我最初的猜测是,这是一个firefox版本,与您正在使用的selenium版本不兼容,因为这可能是我看到的此类问题中最常见的问题。我不是每天都使用FF,为我下载并安装FF 31是。。今年使用FF的第一次经验:)并降级到FF 9,对我来说是解决方案