【发布时间】:2018-04-22 10:11:19
【问题描述】:
简单的 rspec 测试:
it "should login" do
fill_in 'email', with: 'tom@domain.com'
fill_in 'password', with: '123456'
click_on I18n.t('ui.pages.login')
expect(current_path).to eq('/projects')
end
问题是:Chrome 只输入“12456”并跳过“3”——不管我做什么。
我尝试了以下方法:
- 在电子邮件填写后设置睡眠时间
- 使用 ID (id="password") 显式命名电子邮件字段
对两者都没有影响,仍然没有输入所有字符。
我的设置:
- 使用水豚2.15.4
- 使用 rspec-core 3.7.0 使用
- chromedriver-helper 1.1.0
- 使用 selenium-webdriver 3.7.0
【问题讨论】: