playwright-ruby-client icon indicating copy to clipboard operation
playwright-ruby-client copied to clipboard

Error when using `binding.irb`, how to make it work ?

Open jean-francois-labbe opened this issue 1 year ago • 7 comments

Usecase / What to achieve

I'm able to run a test but when I add binding.irb or binding.b in test the test doesn't start at all, same thing with a sleep 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')

Playwright::Error:
  Element is not attached to the DOM
  Call log:
  attempting click action
    -   waiting for element to be visible, enabled and stable
    -   element is visible, enabled and stable
    -   scrolling into view if needed
# /Users/.gem/ruby/3.1.4/gems/concurrent-ruby-1.2.3/lib/concurrent-ruby/concurrent/promises.rb:1268:in `raise'
# /Users/.gem/ruby/3.1.4/gems/concurrent-ruby-1.2.3/lib/concurrent-ruby/concurrent/promises.rb:1268:in `wait_until_resolved!'
# /Users/.gem/ruby/3.1.4/gems/concurrent-ruby-1.2.3/lib/concurrent-ruby/concurrent/promises.rb:1482:in `value!'
# /Users/.gem/ruby/3.1.4/gems/playwright-ruby-client-1.41.1/lib/playwright/connection.rb:118:in `send_message_to_server'
# /Users/.gem/ruby/3.1.4/gems/playwright-ruby-client-1.41.1/lib/playwright/channel.rb:35:in `block in send_message_to_server_result'
# /Users/.gem/ruby/3.1.4/gems/playwright-ruby-client-1.41.1/lib/playwright/channel.rb:67:in `with_logging'
# /Users/.gem/ruby/3.1.4/gems/playwright-ruby-client-1.41.1/lib/playwright/channel.rb:34:in `send_message_to_server_result'
# /Users/.gem/ruby/3.1.4/gems/playwright-ruby-client-1.41.1/lib/playwright/channel.rb:20:in `send_message_to_server'
# /Users/.gem/ruby/3.1.4/gems/playwright-ruby-client-1.41.1/lib/playwright/channel_owners/element_handle.rb:121:in `click'
# /Users/.gem/ruby/3.1.4/gems/playwright-ruby-client-1.41.1/lib/playwright_api/element_handle.rb:106:in `click'
# /Users/.gem/ruby/3.1.4/gems/capybara-playwright-driver-0.5.1/lib/capybara/playwright/node.rb:363:in `click'
# /Users/.gem/ruby/3.1.4/gems/capybara-3.40.0/lib/capybara/node/element.rb:172:in `block in click'
# /Users/.gem/ruby/3.1.4/gems/capybara-3.40.0/lib/capybara/node/element.rb:608:in `block in perform_click_action'
# /Users/.gem/ruby/3.1.4/gems/capybara-3.40.0/lib/capybara/node/base.rb:84:in `synchronize'
# /Users/.gem/ruby/3.1.4/gems/capybara-3.40.0/lib/capybara/node/element.rb:608:in `perform_click_action'
# /Users/.gem/ruby/3.1.4/gems/capybara-playwright-driver-0.5.1/lib/capybara/playwright/node.rb:12:in `perform_click_action'
# /Users/.gem/ruby/3.1.4/gems/capybara-3.40.0/lib/capybara/node/element.rb:171:in `click'
# /Users/.gem/ruby/3.1.4/gems/capybara-3.40.0/lib/capybara/node/actions.rb:26:in `click_link_or_button'
# /Users/.gem/ruby/3.1.4/gems/capybara-3.40.0/lib/capybara/session.rb:774:in `click_on'
# /Users/.gem/ruby/3.1.4/gems/capybara-3.40.0/lib/capybara/dsl.rb:52:in `call'
# /Users/.gem/ruby/3.1.4/gems/capybara-3.40.0/lib/capybara/dsl.rb:52:in `click_on'
# ./spec/features/sign_up_spec.rb:82:in `block (3 levels) in <top (required)>'

Question

What should I do, change in the configuration to be able to use binding.irb ?

jean-francois-labbe avatar Feb 23 '24 16:02 jean-francois-labbe