Skip to content

Instantly share code, notes, and snippets.

@rohitkadam19
Created June 28, 2012 06:04
Show Gist options
  • Save rohitkadam19/3009417 to your computer and use it in GitHub Desktop.
Save rohitkadam19/3009417 to your computer and use it in GitHub Desktop.
Selenum webdriver on ipad real device
# Code ---
require 'selenium-webdriver'
driver = Selenium::WebDriver.for :remote, :url => "http://10.10.10.55:3001/wd/hub", :desired_capabilities => :ipad
# Output ---
=begin
URI::InvalidURIError: the scheme http does not accept registry part: (null):(null) (or bad hostname?)
from /Users/rohit/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/uri/generic.rb:199:in `initialize'
from /Users/rohit/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/uri/http.rb:78:in `initialize'
from /Users/rohit/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/uri/common.rb:177:in `new'
from /Users/rohit/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/uri/common.rb:177:in `parse'
from /Users/rohit/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/uri/common.rb:628:in `parse'
from /Users/rohit/.rvm/gems/ruby-1.9.2-p290@playerTests/gems/selenium-webdriver-2.22.2/lib/selenium/webdriver/remote/http/default.rb:57:in `request'
from /Users/rohit/.rvm/gems/ruby-1.9.2-p290@playerTests/gems/selenium-webdriver-2.22.2/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
from /Users/rohit/.rvm/gems/ruby-1.9.2-p290@playerTests/gems/selenium-webdriver-2.22.2/lib/selenium/webdriver/remote/bridge.rb:598:in `raw_execute'
from /Users/rohit/.rvm/gems/ruby-1.9.2-p290@playerTests/gems/selenium-webdriver-2.22.2/lib/selenium/webdriver/remote/bridge.rb:92:in `create_session'
from /Users/rohit/.rvm/gems/ruby-1.9.2-p290@playerTests/gems/selenium-webdriver-2.22.2/lib/selenium/webdriver/remote/bridge.rb:68:in `initialize'
from /Users/rohit/.rvm/gems/ruby-1.9.2-p290@playerTests/gems/selenium-webdriver-2.22.2/lib/selenium/webdriver/common/driver.rb:33:in `new'
from /Users/rohit/.rvm/gems/ruby-1.9.2-p290@playerTests/gems/selenium-webdriver-2.22.2/lib/selenium/webdriver/common/driver.rb:33:in `for'
from /Users/rohit/.rvm/gems/ruby-1.9.2-p290@playerTests/gems/selenium-webdriver-2.22.2/lib/selenium/webdriver.rb:65:in `for'
from (irb):7
from /Users/rohit/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>'
=end
@rohitkadam19
Copy link
Author

iWebDriver app get starts on ipad but when I try to use hub URL through ruby selenium webdriver it throws errors, which I pasted in :gist. and same thing works on iphone(real device)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment