From 9be468c8ece80a095dd78d09e74a23d21bf77347 Mon Sep 17 00:00:00 2001 From: Iain Beeston Date: Thu, 10 Oct 2024 14:08:51 +0100 Subject: [PATCH] Made the send_keys helper work in selenium as well as cuprite A few of the test helpers use the `type` helper method but in selenium it raises this error: NoMethodError: undefined method `keyboard' for # I've changed this to do the same thing (type in the focused element) but in a way that should work in every capybara driver. --- lib/avo/test_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/avo/test_helpers.rb b/lib/avo/test_helpers.rb index acf310f575..1a8347c076 100644 --- a/lib/avo/test_helpers.rb +++ b/lib/avo/test_helpers.rb @@ -313,7 +313,7 @@ def tag_suggestions(field:, input:) end def type(...) - page.driver.browser.keyboard.type(...) + page.send_keys(...) end def accept_custom_alert(&block)