无法从外壳以外的其他用户打开浏览器

时间:2019-02-10 10:19:46

标签: python selenium firefox selenium-chromedriver

我用FireFox编写了硒python测试。

当我尝试从与外壳程序不同的Linux用户运行测试时,出现此错误:

selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details

OS:RHEL 6.5 FF:45.0 壁虎驱动程序:0.16.1 硒:3.141

class Test:
  def setUp(self):

    GeckoInit()

    firefox_capabilities = DesiredCapabilities.FIREFOX

    firefox_capabilities['marionette'] = False

    binary = FirefoxBinary("/pkgs/firefox/v45.0/firefox")

    self.browser = Browser(binary, firefox_capabilities)



class Browser(Firefox):

  def __init__(self, binary, desired_capabilities):

    super(Browser, self).__init__(firefox_binary=binary, desired_capabilities=desired_capabilities)

0 个答案:

没有答案
相关问题