OSDN Git Service

Regular updates
[twpd/master.git] / capybara.md
index 061763f..df5fad2 100644 (file)
@@ -3,7 +3,7 @@ title: Capybara
 category: Ruby libraries
 layout: 2017/sheet
 weight: -5
-updated: 2017-08-30
+updated: 2020-06-13
 tags: [Featurable]
 ---
 
@@ -13,9 +13,11 @@ tags: [Featurable]
 
 ### Clicking links and buttons
 
-    click 'Link Text'
-    click_button
-    click_link
+```ruby
+click_on 'Link Text'
+click_button
+click_link
+```
 
 ### Interacting with forms
 
@@ -217,7 +219,7 @@ find('#x').fill_in('Street', with: 'Hello')
 ### Scripting
 
 ```ruby
-execute_script('$("input").trigger('change')')
+execute_script('$("input").trigger("change")')
 evaluate_script('window.ga')
 ```