profile = Selenium::WebDriver::Firefox::Profile.new # 新建了url为proxy.org,端口为8080的htpp代理 proxy = Selenium::WebDriver::Proxy.new(:http => "proxy.org:8080") profile.proxy = proxy driver = Selenium::WebDriver.for :firefox, :profile => profile