Closed YusukeIwaki closed 1 year ago
require 'playwright' Playwright.connect_to_browser_server(ENV['BROWSER_SERVER_URL']) do |browser| page = browser.new_page page.goto('https://github.com/YusukeIwaki') page.close end
$ npx playwright@1.35.0 launch-server --browser chromium ws://127.0.0.1:59237/3f5b568c34a1032be192ec94a4224011
$ BROWSER_SERVER_URL=ws://127.0.0.1:59237/3f5b568c34a1032be192ec94a4224011 bundle exec ruby a.rb /Users/yusuke-iwaki/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/playwright-ruby-client-1.34.0/lib/playwright.rb:162:in `connect_to_browser_server': undefined method `did_launch_browser' for #<> (NoMethodError) browser.browser_type.send(:did_launch_browser, browser) ^^^^^ from a.rb:3:in `<main>'
Successfully connect to browser server.
Paste the output of ruby --version
ruby --version
$ ruby --version ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-darwin22]
Step To Reproduce / Observed behavior
Expected behavior
Successfully connect to browser server.
Environment
Paste the output of
ruby --version