This file contains hidden or 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
| require "capybara/poltergeist" | |
| html = DATA.read | |
| app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
| sess = Capybara::Session.new(:poltergeist, app) | |
| sess.visit("/") | |
| puts "drag table text is #{sess.find(:css, '#drag_table').text}" | |
| sess.find(:css, '#row1 td.handle').drag_to(sess.find(:css,'#row3')) | |
| puts "drag table text is now #{sess.find(:css, '#drag_table').text}" |
This file contains hidden or 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
| require "capybara" | |
| require "benchmark" | |
| # require "capybara/poltergeist" | |
| # require "capybara/webkit" | |
| html = DATA.read | |
| app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
| sess = Capybara::Session.new(:selenium, app) | |
| sess.visit("/") |
This file contains hidden or 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
| require "capybara" | |
| require "benchmark" | |
| require "capybara/poltergeist" | |
| # require "selenium-webdriver" | |
| html = DATA.read | |
| app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
| # sess = Capybara::Session.new(:selenium, app) | |
| sess = Capybara::Session.new(:poltergeist, app) |
This file contains hidden or 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
| require "capybara" | |
| html = DATA.read | |
| app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
| sess = Capybara::Session.new(:selenium, app) | |
| sess.visit("/") | |
| #This throws the error | |
| sess.first(:css, '.item').text |
This file contains hidden or 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
| require "capybara/poltergeist" | |
| html = DATA.read | |
| app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
| sess = Capybara::Session.new(:poltergeist, app) | |
| sess.visit("/") | |
| # behavior to be tested here | |
| __END__ |
This file contains hidden or 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
| require "capybara" | |
| require "capybara/poltergeist" | |
| html = DATA.read | |
| app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
| sess = Capybara::Session.new(:poltergeist, app) | |
| sess.visit("/") | |
| sess.find("div[contenteditable]").set("my new content") |
This file contains hidden or 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
| require "capybara/poltergeist" | |
| # require "selenium-webdriver" | |
| html = DATA.read | |
| app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
| # sess = Capybara::Session.new(:selenium, app) | |
| sess = Capybara::Session.new(:poltergeist, app) |
This file contains hidden or 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
| require 'selenium/webdriver' | |
| require 'capybara/dsl' | |
| require 'rspec' | |
| require 'capybara/rspec' | |
| require 'byebug' | |
| html = DATA.read | |
| app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
| RSpec.configure { |c| c.include Capybara::RSpecMatchers } |
This file contains hidden or 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
| require "capybara/dsl" | |
| require "selenium/webdriver" | |
| sess = Capybara::Session.new(:selenium) | |
| sess.visit("http://jsfiddle.net/AlexZeitler/fPWFd/") | |
| sess.within_frame('result') do | |
| byebug | |
| sess.attach_file(File.absolute_path(__FILE__), make_visible: false) | |
| end |
OlderNewer