Open tgentry-bamboo opened 1 week ago
In doing some research (mostly reading this closed Issue from a merged PR: https://github.com/teamcapybara/capybara/pull/2422) I now see the we can send keypresses directly to the current session with Capybara.current_session.send_keys("ENTER")
.
Is there a way to send the keyboard control code or whatever the browser equivalent is for the ENTER key so that I can submit the form? Thank you!
Scratch that last question, for anyone else finding this thread in the future, the way to send control codes directly to the underlying driver (Selenium for Chrome in this case: https://github.com/SeleniumHQ/selenium/wiki/Ruby-Bindings#api-example) is to simply send the key as a symbol like so:
Capybara.current_session.send_keys :enter
Meta
Capybara Version: 3.40.0 Driver Information (and browser if relevant): selenium-webdriver 4.10.0 and Chrome
Expected Behavior
"Continue" button is clicked sending a POST request to my Controller and advancing the setup flow.
Actual Behavior
"Continue" button is located, click is performed but no action is taken.
Steps to reproduce
Capybara is configured to use its default options for selenium-webdriver. The line that is causing the issue is:
find(:xpath, '//*[@id="content"]/div[3]/div/div/div[3]/div/button[1]').click
I've also tried:
click_on 'Submit'
The button needing to be clicked is nothing out of the ordinary:
Can anyone help me track down this issue? I'm willing to open a PR if it's necessary but I'm at a loss for what could be causing the behavior to begin with. Thank you!