Skip to content

Instantly share code, notes, and snippets.

@twalpole
Created May 6, 2019 23:58
Show Gist options
  • Save twalpole/bd89f1b48aac3d2b211863cdcf2a1593 to your computer and use it in GitHub Desktop.
Save twalpole/bd89f1b48aac3d2b211863cdcf2a1593 to your computer and use it in GitHub Desktop.
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'selenium-webdriver'
gem 'capybara'
end
require "capybara/dsl"
sess = Capybara::Session.new(:selenium_chrome)
sess.visit('https://codepen.io/moroshko/pen/LGNJMy')
sess.within_frame(:css, '#result:not([src=""])') do
input = sess.find('#app input')
input.click.send_keys('c')
sess.assert_selector('li[role="option"]')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment