Joel Pearson wrote in post #1120772:
> Love U Ruby wrote in post #1120768:
>> Really make sense!!

require "selenium-webdriver"

driver = Selenium::WebDriver.for :firefox
url = 'https://www.google.co.in/'
t = Thread.new(url,driver) do |u,d|
  d.get("https://www.google.co.in")
  d.execute_script("alert('I AM HERE');")
end

t.join()

getting error as:

[remote server] 
file:///tmp/webdriver-profile20130908-4868-dn1alc/extensions/fxdriver / googlecode.com/components/driver_component.js:8360:in 
`r': waiting for evaluate.js load failed 
(Selenium::WebDriver::Error::JavascriptError)
  from [remote server] 
file:///tmp/webdriver-profile20130908-4868-dn1alc/extensions/fxdriver / googlecode.com/components/driver_component.js:392:in 
`fxdriver.Timer.prototype.runWhenTrue/g'
  from [remote server] 
file:///tmp/webdriver-profile20130908-4868-dn1alc/extensions/fxdriver / googlecode.com/components/driver_component.js:386:in 
`fxdriver.Timer.prototype.setTimeout/<.notify'
  from 
/home/kirti/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/response.rb:51:in 
`assert_ok'
  from 
/home/kirti/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/response.rb:15:in 
`initialize'
  from 
/home/kirti/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/http/common.rb:59:in 
`new'
  from 
/home/kirti/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/http/common.rb:59:in 
`create_response'
  from 
/home/kirti/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/http/default.rb:66:in 
`request'
  from 
/home/kirti/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/http/common.rb:40:in 
`call'
  from 
/home/kirti/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/bridge.rb:629:in 
`raw_execute'
  from 
/home/kirti/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/bridge.rb:607:in 
`execute'
  from 
/home/kirti/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/bridge.rb:328:in 
`executeScript'
  from 
/home/kirti/.rvm/gems/ruby-2.0.0-p0/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/common/driver.rb:213:in 
`execute_script'
  from /home/kirti/ruby/SO.rb:7:in `block in <main>'
[Finished in 62.6s with exit code 1]

What wrong I did ?

-- 
Posted via http://www.ruby-forum.com/.