Tag: google chrome

Rack Sessions在Chrome中迷失了

我有一个非常简单的应用程序托管在EC2上使用Sinatra构建,在nginx后面提供服务。 问题是,使用Chrome,会话变量在Sinatra中“丢失”。 它不会发生在Firefox中。 这是使用Rack :: Session :: Cookie。 这与此问题类似: Sinatra不会在Chrome上使用重定向来保持会话 任何有关如何在Chrome中解决此问题的见解将不胜感激。

是否有镀铬开关来抑制“外部协议请求”?

是否有镀铬开关来抑制“外部协议请求”? 我正在使用selenium – ruby​​ – watir webdriver自动化应用程序。 我在网上搜索了绕过此窗口和对话的解决方案: http : //productforums.google.com/forum/#!topic/chrome/K22hXwRy6zQ概述了我们如何手动执行此操作。 但对于Selenium-Chrome-Ruby,我需要通过设置chrome开关来实现这一点(chorme开关列表:= http://src.chromium.org/svn/trunk/src/chrome/common/chrome_switches.cc ) 。 这是一个巨大的清单。 我需要帮助找出哪个开关可能会帮助我绕过外部协议请求窗口,或者通过自动化有什么解决方法?

Sinatra没有坚持使用Chrome重定向会话

Sinatra没有通过重定向Chrome来坚持我的会话。 它正在创建一个全新的会话,我将丢失以前的所有会话数据。 作为一个例子(类似于Sinatra文档 ),我正在做这样的事情: enable :sessions get ‘/foo’ do session[:user_id] = 123 session[:session_id] # “ABC”, for example redirect to(‘/bar’) end get ‘/bar’ do # this is “DEF” when responding to Chrome (wrong), # but “ABC” when responding to Firefox or Safari (right) session[:session_id] # this is nil when responding to Chrome (wrong), # but 123 […]

如何指定chromedriver二进制文件的位置

之前我把Chrome二进制文件“chromedriver.exe”放在“C:/ Windows”目录中,Watir从那里选择它。 现在我必须将我的项目移动到另一台机器上,因此我无法对可执行路径进行硬编码。 我还希望二进制文件与Git上的代码保持一致,而不是让每个测试工程师在发布新版本时手动更新二进制文件。 现在我已经将Chrome二进制文件放在绝对路径上,但是找不到它。 这是我尝试过的(hooks.rb): Before do puts “inside hooks in before” profile = Selenium::WebDriver::Chrome::Profile.new profile[‘download.prompt_for_download’] = false profile[‘download.default_directory’] = File.join(File.absolute_path(‘../..’, File.dirname(__FILE__)),”browsers/chromedriver.exe”) @browser = Watir::Browser.new :chrome, :profile => profile end 输出是: inside hooks in before Selenium::WebDriver::Error::WebDriverError: Unable to find the chromedriver executable. Please download the server from http://chromedriver.storage.googleapis.com/index.html and place it somewhere on your […]