Tag: firefox

Chrome浏览器后退按钮问题

我在Rails应用程序中的表单中有一组单选按钮。 该function类似于单击未选中的单选按钮,它会在单击选中的单选按钮时重定向到同一页面。 根据URL的param值选择单选按钮 问题 : 选择一个新的单选按钮 单击浏览器后退按钮 现在,除了单选按钮选择之外,所有数据都会根据param值进行刷新。 单选按钮仍处于初始状态。 注意:问题仅发生在Chrome 。 它在Firefox和IE运行良好

在Rails中生成VAPID公钥并将其传递给Javascript

为了使用带有VAPID的Push API,我需要一个applicationServerKey : serviceWorkerRegistration.pushManager.subscribe({ userVisibleOnly: true, applicationServerKey: applicationServerKey // we’ve got it with getApplicationServerKey() defined below }); 我用Ruby在服务器端生成它: ecdsa_private_key = OpenSSL::PKey::EC.new ‘prime256v1’ ecdsa_private_key.generate_key sender.vapid_private_key = ecdsa_private_key.to_pem ecdsa_public_key = OpenSSL::PKey::EC.new ecdsa_private_key ecdsa_public_key.private_key = nil sender.vapid_public_key = ecdsa_public_key.to_pem 然后我必须下载它: getApplicationServerKey: function () { return new Promise(function (resolve, reject) { var request = new Request(‘https://example.com/application_server_key’); fetch(request).then(function (response) { […]

如何防止Firefox以安全模式启动?

使用Selenium运行Rails测试套件通常会以“以安全模式启动?”打开Firefox。 对话。 有没有办法要么1)禁用它,或2)添加一个脚本,如果对话框出现,将回答“否”?

Firefox不会从CloudFront渲染字体

我有一个Rails应用程序,托管在Heroku上 。 在部署期间,资产通过asset_sync gem与Amazon S3存储桶同步,并且视图通过CloudFront调用这些资产。 但是,使用Firefox查看网站时不会呈现字体(文件在Firebug的“网络”选项卡中加载,但根本不使用)。 Safari很棒。 我在S3上有以下CORS配置: * GET 3000 Content-* Host 我的应用程序还设置了以下标题: Access-Control-Allow-Origin: * Access-Control-Request-Method: * 但CloudFront返回没有它们的字体…为什么没有加载字体? 提前致谢。

LiveReload不工作Guard(火狐)

我有一个有趣的问题,我有LiveReload在Chrome中工作,所以我知道它安装正确,但我不能为我的生活让它在Firefox 9.0.1上运行。 我激活了我网站上的图标,它只是保持红色,我的守卫终端显示以下症状。 Browser connected. Browser URL: {“command”:”hello”,”protocols”:[“http://livereload.com/protocols/connection-check-1”]} Browser disconnected. 这是我的警卫档案。 guard ‘livereload’ do watch(%r{app/.+\.(erb|haml)}) watch(%r{app/helpers/.+\.rb}) watch(%r{(public/|app/assets).+\.(css|js|html)}) watch(%r{(app/assets/.+\.css)\.s[ac]ss}) { |m| m[1] } watch(%r{(app/assets/.+\.js)\.coffee}) { |m| m[1] } watch(%r{config/locales/.+\.yml}) end 我做了一些关于这个主题的研究,我所能找到的只是报告问题的人,然后报告它刚刚清理完毕,没有任何开发人员的解释。 有趣!

Watir Webdriver(0.9.1)不再打开Firefox实例

使用Watir Webdriver v0.9.1 for rails(以及Selenium Webdriver 2.53.1)时,Firefox正在打开时 browser = Watir::Browser.new :firefox 被称为。 然而,现在它失败了 unable to bind to locking port 7054 within 45 seconds @ /Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/common/socket_lock.rb:59:in `lock’ /Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/common/socket_lock.rb:40:in `locked’ /Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/firefox/launcher.rb:51:in `launch’ /Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/firefox/bridge.rb:43:in `initialize’ /Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/common/driver.rb:53:in `new’ /Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/common/driver.rb:53:in `for’ /Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver.rb:84:in `for’ /Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/watir-webdriver-0.9.1/lib/watir-webdriver/browser.rb:46:in `initialize’ test/integration/like_fanpage_task_test.rb:40:in `new’ test/integration/like_fanpage_task_test.rb:40:in `block (2 levels) in ‘ 它似乎随机地这样做,因为我没有从其工作forms更改代码,并且该行是第一行调用。 我有Firefox 37.0.2,之前有效。 我已经尝试重新启动计算机,杀死与ruby和Firefox相关的进程并重新启动它们,然后重新安装Firefox但无济于事。

Paperclip和xhr.sendAsBinary

我使用paperclip将文件添加到我的模型中。 我想使用firefox 3.6的新functionxhr.sendAsBinary来发送带有ajax请求的文件。 以下是我构建请求的方式: var xhr = new XMLHttpRequest(); xhr.open(“POST”, “/photos?authenticity_token=” + token + “&photo[name]=” + img.name + “&photo[size]=” + img.size); xhr.overrideMimeType(‘text/plain; charset=x-user-defined-binary’); xhr.sendAsBinary(bin); name和size保存在我的模型中没有问题,但文件本身不会被回形针捕获。 我的模特 class Photo { :medium => “300×300>”, :thumb => “100×100>” } end 迁移 def self.up add_column :photos, :photo_file_name, :string add_column :photos, :photo_content_type, :string add_column :photos, :photo_file_size, :integer add_column :photos, :photo_updated_at, […]

如何使用Selenium在Firefox中处理安全警报

我正在使用带有ruby的selenium-webdriver来编写自动化测试。 Chrome和chromedriver二进制文件工作非常好,但是我遇到了与浏览器配置相关的Firefox问题,这使我的测试失败,而他们通过了Chrome。 在Firefox中执行测试时,有时我会收到有关此消息的警报: 虽然此页面已加密,但您输入的信息将通过未加密的连接发送,并且可以由第三方轻松读取 它打破了执行。 有没有办法在最近的Firefox版本(10+)中禁用此警告或使用Selenium处理此行为?

如何使用watir打开浏览器?

使用我的ruby代码我想打开Tor Browser而不是Firefox,为此我尝试了这段代码 path=’C:\Tor Browser\App\tor.exe’ Selenium::WebDriver::Firefox.path = path driver = Selenium::WebDriver.for :firefox ie = Watir::Browser.new :firefox, :driver => driver 我收到了这个错误 c:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/firefox/launcher.rb:79:in `connect_until_stable’: unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) (Selenium::WebDriver::Error::WebDriverError) from c:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/firefox/launcher.rb:37:in `block in launch’ from c:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/firefox/socket_lock.rb:20:in `locked’ from c:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/firefox/launcher.rb:32:in `launch’ from c:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/firefox/bridge.rb:24:in `initialize’ from c:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/common/driver.rb:31:in `new’ from c:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/common/driver.rb:31:in `for’ from c:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver.rb:67:in `for’ […]

watir-webdriver在保持浏览器打开的同时更改代理

我在Ruby中使用Watir-Webdriver库来检查一些页面。 我知道我可以使用代理连接 profile = Selenium::WebDriver::Firefox::Profile.new#create a new profile profile.proxy = Selenium::WebDriver::Proxy.new(#create proxy data for in the profile :http => proxyadress, :ftp => nil, :ssl => nil, :no_proxy => nil ) browser = Watir::Browser.new :firefox, :profile => profile#create a browser window with this profile browser.goto “http://www.example.com” browser.close 但是,当想要使用不同的代理多次连接到同一页面时,我必须为每个代理创建一个新的浏览器。 加载(和卸载)浏览器需要相当长的时间。 所以,我的问题: 有没有办法改变,使用ruby中的webdriver,Firefox使用代理地址连接,同时保持浏览器打开?