江南
2017-12-15 14:42:23 UTC
Hi,
I have tried your code above but I'm getting this error message:
NameError: uninitialized constant WebDriver
I'm using Window.
--
Before posting, please read http://watir.com/support. In short: search before you ask, be nice.
watir-***@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+***@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I have tried your code above but I'm getting this error message:
NameError: uninitialized constant WebDriver
I'm using Window.
http://watirmelon.com/2010/12/14/watir-webdriver-a-detailed-introduction/
I grabbed the selenium-server-standalone jar and put in my app folder
# This is working on Windows/JRuby!
require "rubygems"
require "bundler/setup"
require "watir-webdriver"
require 'selenium/server'
server = Selenium::Server.new("selenium-server-
standalone-2.0b1.jar", :background => true)
server.start
include Selenium
capabilities =
WebDriver::Remote::Capabilities.htmlunit(:javascript_enabled => true)
b = Watir::Browser.new(:remote, :url => 'http://127.0.0.1:4444/wd/
hub', :desired_capabilities => capabilities)
# Browser fun here
b.close
server.stop
--I grabbed the selenium-server-standalone jar and put in my app folder
# This is working on Windows/JRuby!
require "rubygems"
require "bundler/setup"
require "watir-webdriver"
require 'selenium/server'
server = Selenium::Server.new("selenium-server-
standalone-2.0b1.jar", :background => true)
server.start
include Selenium
capabilities =
WebDriver::Remote::Capabilities.htmlunit(:javascript_enabled => true)
b = Watir::Browser.new(:remote, :url => 'http://127.0.0.1:4444/wd/
hub', :desired_capabilities => capabilities)
# Browser fun here
b.close
server.stop
--
Before posting, please read http://watir.com/support. In short: search before you ask, be nice.
watir-***@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+***@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.