YusukeIwaki / playwright-ruby-client

Playwright client for Ruby
https://playwright-ruby-client.vercel.app/
MIT License
336 stars 34 forks source link

response.body stucked/freeze #227

Closed shaktik1989 closed 1 year ago

shaktik1989 commented 1 year ago

Step To Reproduce / Observed behavior

Playwright.create(playwright_cli_executable_path: './node_modules/.bin/playwright') do |playwright|
  playwright.chromium.launch(headless: false) do |browser|
    page = browser.new_page
    page.on("response", ->(response) { puts response.body }) //When I call response.body it get freezed and not returning responsebody
    page.goto('https://github.com/YusukeIwaki/playwright-ruby-client/issues')
    sleep(1)  
  end
end

Expected behavior

page.on("response", ->(response) { puts response.body }) This line should print the response of the api on console

Environment

ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux] Paste the output of ruby --version

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

YusukeIwaki commented 1 year ago

Sorry for inconvenience for a long time. This bug will be fixed in the next release.

YusukeIwaki commented 1 year ago

@shaktik1989 https://rubygems.org/gems/playwright-ruby-client/versions/1.28.1 would fix this problem.