-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using binding.irb
, how to make it work ?
#281
Comments
The behabior is unexpected since I myself use binding.pry for debugging described source codes. Could you provide an example code for reproducing this issue? |
This example code doesn't trigger timeout.
And the provided call stack shows
so it is probably capybara-playwright-driver's bug or spec. |
Sorry for my mistake, I found playwright-ruby-client >= 1.40.0 raises such error after we use |
@YusukeIwaki Sorry for the delay. It looks like you found the cause of the issue. Is there anything I can do do help solve it ? The spec looks like this: it "signed up user" do
visit root_path
detected_locale = find("select[name='lang']").value
switch_locale_to(detected_locale) do
click_on I18n.t('views.sessions.new_account') # breaks here when binding.b is set under.
expect(page).to have_current_path(new_user_session_path(lang: detected_locale))
fill_in 'user_first_name', with: 'John'
fill_in 'user_last_name', with: 'Doe'
fill_in 'user_email', with: '[email protected]'
fill_in 'user_password', with: 'password'
click_on I18n.t('views.sessions.sign_up')
binding.b # break point is here
expect(page).to have_content(I18n.t('devise.registrations.signed_up'))
end
end It is specific to the application, if needed I could try to create a minimal repository to reproduce the issue. What is strange is that the binding.b is declared at the bottom of the test but the execption occurs on this line When there is no |
I tried with
It may not only be related to the I can have same error when and rapidly clicking on the play button. |
Sorry for late reply,
#292 would fix the issue and playwright-ruby-client 1.41.2 and 1.42.1 include the patch. |
This can be a bug of capybara-playwright-driver, however I recommend using web-first assertion provided by Playwright, instead of Capybara's assertion, if possible.
Playwright's auto-waiting feature is more precise than Capybara's behavior. |
Usecase / What to achieve
I'm able to run a test but when I add
binding.irb
orbinding.b
in test the test doesn't start at all, same thing with asleep 3
I tried with
PWDEBUG=1 rspec
but the error is the same.Error message is:
Failure/Error: click_on I18n.t('views.sessions.new_account')
Question
What should I do, change in the configuration to be able to use
binding.irb
?The text was updated successfully, but these errors were encountered: