Created
April 2, 2011 22:44
-
-
Save jamescway/899980 to your computer and use it in GitHub Desktop.
test script to test selenium webdriver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
******************************************************************************** | |
Using script: | |
require 'rubygems' | |
require 'selenium-webdriver' | |
$DEBUG = true | |
Selenium::WebDriver.for(:firefox).quit | |
Results below: | |
******************************************************************************** | |
{:extension=>:webdriver} | |
Exception `Errno::ENOENT' at /Users/james/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1217 - No such file or directory - /var/folders/Ro/RovGc4lpENCUuQhDi-g4-k+++TU/-Tmp-/webdriver-profile20110402-36871-19bep8k/extensions/[email protected] | |
Exception `Errno::ENOENT' at /Users/james/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1217 - No such file or directory - /var/folders/Ro/RovGc4lpENCUuQhDi-g4-k+++TU/-Tmp-/webdriver-profile20110402-36871-19bep8k/extensions/[email protected] | |
Exception `Errno::ENOENT' at /Users/james/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1314 - No such file or directory - /var/folders/Ro/RovGc4lpENCUuQhDi-g4-k+++TU/-Tmp-/webdriver-profile20110402-36871-19bep8k/extensions/[email protected] | |
Exception `Errno::ENOENT' at /Users/james/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1314 - No such file or directory - /var/folders/Ro/RovGc4lpENCUuQhDi-g4-k+++TU/-Tmp-/webdriver-profile20110402-36871-19bep8k/.parentlock | |
Exception `Errno::ENOENT' at /Users/james/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1314 - No such file or directory - /var/folders/Ro/RovGc4lpENCUuQhDi-g4-k+++TU/-Tmp-/webdriver-profile20110402-36871-19bep8k/parent.lock | |
Exception `Errno::ENOENT' at /Users/james/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1314 - No such file or directory - /var/folders/Ro/RovGc4lpENCUuQhDi-g4-k+++TU/-Tmp-/webdriver-profile20110402-36871-19bep8k/extensions.cache | |
{"browser.startup.page"=>"0"} | |
{"browser.startup.homepage"=>"\"about:blank\""} | |
{"webdriver_firefox_port"=>"7055"} | |
{"app.update.auto"=>"false"} | |
{"app.update.enabled"=>"false"} | |
{"browser.download.manager.showWhenStarting"=>"false"} | |
{"browser.EULA.override"=>"true"} | |
{"browser.EULA.3.accepted"=>"true"} | |
{"browser.link.open_external"=>"2"} | |
{"browser.link.open_newwindow"=>"2"} | |
{"browser.safebrowsing.enabled"=>"false"} | |
{"browser.search.update"=>"false"} | |
{"browser.sessionstore.resume_from_crash"=>"false"} | |
{"browser.shell.checkDefaultBrowser"=>"false"} | |
{"browser.tabs.warnOnClose"=>"false"} | |
{"browser.tabs.warnOnOpen"=>"false"} | |
{"devtools.errorconsole.enabled"=>"true"} | |
{"dom.disable_open_during_load"=>"false"} | |
{"dom.max_script_run_time"=>"30"} | |
{"extensions.logging.enabled"=>"true"} | |
{"extensions.update.enabled"=>"false"} | |
{"extensions.update.notifyUser"=>"false"} | |
{"network.manage-offline-status"=>"false"} | |
{"network.http.max-connections-per-server"=>"10"} | |
{"prompts.tab_modal.enabled"=>"false"} | |
{"security.warn_entering_secure"=>"false"} | |
{"security.warn_submit_insecure"=>"false"} | |
{"security.warn_entering_secure.show_once"=>"false"} | |
{"security.warn_entering_weak"=>"false"} | |
{"security.warn_entering_weak.show_once"=>"false"} | |
{"security.warn_leaving_secure"=>"false"} | |
{"security.warn_leaving_secure.show_once"=>"false"} | |
{"security.warn_viewing_mixed"=>"false"} | |
{"security.warn_viewing_mixed.show_once"=>"false"} | |
{"signon.rememberSignons"=>"false"} | |
{"toolkit.networkmanager.disable"=>"true"} | |
{"javascript.options.showInConsole"=>"true"} | |
{"browser.dom.window.dump.enabled"=>"true"} | |
{"dom.report_all_js_exceptions"=>"true"} | |
{"webdriver_accept_untrusted_certs"=>true} | |
{"webdriver_enable_native_events"=>false} | |
{"webdriver_assume_untrusted_issuer"=>true} | |
{"startup.homepage_welcome_url"=>"\"about:blank\""} | |
dyld: unknown required load command 0x80000022 | |
#<ChildProcess::Unix::Process:0x5f6dd8 @args=["/Applications/Firefox.app/Contents/MacOS/firefox-bin", "-no-remote", "-silent"], @started=true, @exit_code=nil, @io=#<ChildProcess::Unix::IO:0x5f6dc4 @stdout=#<IO:<STDOUT>>, @stderr=#<IO:<STDERR>>>, @detach=false, @duplex=false, @pid=36872> : [{:pid=>nil, :status=>nil}] | |
#<ChildProcess::Unix::Process:0x5f6dd8 @args=["/Applications/Firefox.app/Contents/MacOS/firefox-bin", "-no-remote", "-silent"], @started=true, @exit_code=nil, @io=#<ChildProcess::Unix::IO:0x5f6dc4 @stdout=#<IO:<STDOUT>>, @stderr=#<IO:<STDERR>>>, @detach=false, @duplex=false, @pid=36872> : [{:pid=>36872, :status=>#<Process::Status: pid 36872 SIGTRAP (signal 5)>}] | |
Exception `Selenium::WebDriver::Error::WebDriverError' at /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/binary.rb:66 - unable to start Firefox cleanly, args: ["-silent"] | |
/Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/binary.rb:66:in `cope_with_mac_strangeness': unable to start Firefox cleanly, args: ["-silent"] (Selenium::WebDriver::Error::WebDriverError) | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/binary.rb:30:in `start_with' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/launcher.rb:73:in `start_silent_and_wait' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/launcher.rb:35:in `block in launch' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/socket_lock.rb:20:in `locked' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/launcher.rb:32:in `launch' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/bridge.rb:19:in `initialize' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/common/driver.rb:27:in `new' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/common/driver.rb:27:in `for' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver.rb:74:in `for' | |
from test.rb:5:in `<main>' | |
$ ruby -r socket -e 'p Socket.getaddrinfo "127.0.0.1", 7055' | |
[["AF_INET", 7055, "127.0.0.1", "127.0.0.1", 2, 2, 17], ["AF_INET", 7055, "127.0.0.1", "127.0.0.1", 2, 1, 6]] | |
$ ruby -r socket -e 'p Socket.getaddrinfo "127.0.0.1", 7055, Socket::AF_INET, Socket::SOCK_STREAM' | |
[["AF_INET", 7055, "127.0.0.1", "127.0.0.1", 2, 1, 6]] | |
********************************************************************************************** | |
Using this script: | |
require 'rubygems' | |
require 'selenium-webdriver' | |
$DEBUG = true | |
profile = Selenium::WebDriver::Firefox::Profile.new | |
profile.native_events = false | |
d = Selenium::WebDriver.for :firefox, :profile => profile | |
#Selenium::WebDriver.for(:firefox).quit | |
d.quit | |
Results below: | |
********************************************************************************************* | |
{:extension=>:webdriver} | |
Exception `Errno::ENOENT' at /Users/james/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1217 - No such file or directory - /var/folders/Ro/RovGc4lpENCUuQhDi-g4-k+++TU/-Tmp-/webdriver-profile20110402-36898-1erjepc/extensions/[email protected] | |
Exception `Errno::ENOENT' at /Users/james/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1217 - No such file or directory - /var/folders/Ro/RovGc4lpENCUuQhDi-g4-k+++TU/-Tmp-/webdriver-profile20110402-36898-1erjepc/extensions/[email protected] | |
Exception `Errno::ENOENT' at /Users/james/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1314 - No such file or directory - /var/folders/Ro/RovGc4lpENCUuQhDi-g4-k+++TU/-Tmp-/webdriver-profile20110402-36898-1erjepc/extensions/[email protected] | |
Exception `Errno::ENOENT' at /Users/james/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1314 - No such file or directory - /var/folders/Ro/RovGc4lpENCUuQhDi-g4-k+++TU/-Tmp-/webdriver-profile20110402-36898-1erjepc/.parentlock | |
Exception `Errno::ENOENT' at /Users/james/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1314 - No such file or directory - /var/folders/Ro/RovGc4lpENCUuQhDi-g4-k+++TU/-Tmp-/webdriver-profile20110402-36898-1erjepc/parent.lock | |
Exception `Errno::ENOENT' at /Users/james/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1314 - No such file or directory - /var/folders/Ro/RovGc4lpENCUuQhDi-g4-k+++TU/-Tmp-/webdriver-profile20110402-36898-1erjepc/extensions.cache | |
{"browser.startup.page"=>"0"} | |
{"browser.startup.homepage"=>"\"about:blank\""} | |
{"webdriver_firefox_port"=>"7055"} | |
{"app.update.auto"=>"false"} | |
{"app.update.enabled"=>"false"} | |
{"browser.download.manager.showWhenStarting"=>"false"} | |
{"browser.EULA.override"=>"true"} | |
{"browser.EULA.3.accepted"=>"true"} | |
{"browser.link.open_external"=>"2"} | |
{"browser.link.open_newwindow"=>"2"} | |
{"browser.safebrowsing.enabled"=>"false"} | |
{"browser.search.update"=>"false"} | |
{"browser.sessionstore.resume_from_crash"=>"false"} | |
{"browser.shell.checkDefaultBrowser"=>"false"} | |
{"browser.tabs.warnOnClose"=>"false"} | |
{"browser.tabs.warnOnOpen"=>"false"} | |
{"devtools.errorconsole.enabled"=>"true"} | |
{"dom.disable_open_during_load"=>"false"} | |
{"dom.max_script_run_time"=>"30"} | |
{"extensions.logging.enabled"=>"true"} | |
{"extensions.update.enabled"=>"false"} | |
{"extensions.update.notifyUser"=>"false"} | |
{"network.manage-offline-status"=>"false"} | |
{"network.http.max-connections-per-server"=>"10"} | |
{"prompts.tab_modal.enabled"=>"false"} | |
{"security.warn_entering_secure"=>"false"} | |
{"security.warn_submit_insecure"=>"false"} | |
{"security.warn_entering_secure.show_once"=>"false"} | |
{"security.warn_entering_weak"=>"false"} | |
{"security.warn_entering_weak.show_once"=>"false"} | |
{"security.warn_leaving_secure"=>"false"} | |
{"security.warn_leaving_secure.show_once"=>"false"} | |
{"security.warn_viewing_mixed"=>"false"} | |
{"security.warn_viewing_mixed.show_once"=>"false"} | |
{"signon.rememberSignons"=>"false"} | |
{"toolkit.networkmanager.disable"=>"true"} | |
{"javascript.options.showInConsole"=>"true"} | |
{"browser.dom.window.dump.enabled"=>"true"} | |
{"dom.report_all_js_exceptions"=>"true"} | |
{"webdriver_accept_untrusted_certs"=>true} | |
{"webdriver_enable_native_events"=>false} | |
{"webdriver_assume_untrusted_issuer"=>true} | |
{"startup.homepage_welcome_url"=>"\"about:blank\""} | |
dyld: unknown required load command 0x80000022 | |
#<ChildProcess::Unix::Process:0x5f6a68 @args=["/Applications/Firefox.app/Contents/MacOS/firefox-bin", "-no-remote", "-silent"], @started=true, @exit_code=nil, @io=#<ChildProcess::Unix::IO:0x5f6a54 @stdout=#<IO:<STDOUT>>, @stderr=#<IO:<STDERR>>>, @detach=false, @duplex=false, @pid=36899> : [{:pid=>nil, :status=>nil}] | |
#<ChildProcess::Unix::Process:0x5f6a68 @args=["/Applications/Firefox.app/Contents/MacOS/firefox-bin", "-no-remote", "-silent"], @started=true, @exit_code=nil, @io=#<ChildProcess::Unix::IO:0x5f6a54 @stdout=#<IO:<STDOUT>>, @stderr=#<IO:<STDERR>>>, @detach=false, @duplex=false, @pid=36899> : [{:pid=>36899, :status=>#<Process::Status: pid 36899 SIGTRAP (signal 5)>}] | |
Exception `Selenium::WebDriver::Error::WebDriverError' at /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/binary.rb:66 - unable to start Firefox cleanly, args: ["-silent"] | |
/Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/binary.rb:66:in `cope_with_mac_strangeness': unable to start Firefox cleanly, args: ["-silent"] (Selenium::WebDriver::Error::WebDriverError) | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/binary.rb:30:in `start_with' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/launcher.rb:73:in `start_silent_and_wait' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/launcher.rb:35:in `block in launch' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/socket_lock.rb:20:in `locked' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/launcher.rb:32:in `launch' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/firefox/bridge.rb:19:in `initialize' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/common/driver.rb:27:in `new' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver/common/driver.rb:27:in `for' | |
from /Users/james/.rvm/gems/ruby-1.9.2-p180/gems/selenium-webdriver-0.1.4/lib/selenium/webdriver.rb:74:in `for' | |
from test.rb:8:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment