1
votes

Simple rspec test:

it "should login" do
   fill_in 'email', with: '[email protected]'
   fill_in 'password', with: '123456'
   click_on I18n.t('ui.pages.login')

   expect(current_path).to eq('/projects')
end

The problem is: Chrome only enters "12456" and skips the "3" - whatever I do.

I tried the following:

  1. Putting a sleep time after the email fill_in
  2. Explicitly naming the email field with an ID (id="password")

no effect on both, still not all characters entered.

My setup:

  • Using capybara 2.15.4
  • Using rspec-core 3.7.0 Using
  • chromedriver-helper 1.1.0
  • Using selenium-webdriver 3.7.0
1

1 Answers

0
votes

You're probably experiencing https://bugs.chromium.org/p/chromedriver/issues/detail?id=1771&q=sendKeys&sort=-id&colspec=ID%20Status%20Pri%20Owner%20Summary - If you can produce a simple example that replicates the issue I'm sure the chromedriver authors would appreciate it.

Beyond that, make sure you have updated to the most recent release of chromedriver. Since you're using chromedriver-helper that means following these instructions - https://github.com/flavorjones/chromedriver-helper#updating-to-latest-chromedriver