Closed YusukeIwaki closed 1 year ago
element = page.query_selector('input') element.set_input_files(File.new('./test.rb'))
causes
Errno::ENOENT: No such file or directory @ rb_stat_init - # frozen_string_literal: true
File is enumerable. So https://github.com/YusukeIwaki/playwright-ruby-client/blob/bb3ddf54c292a348d538f0f666c35ecc5f4472e1/lib/playwright/input_files.rb#L7 this doesn't work as expected.
[3] pry(#<Playwright::InputFiles>)> @files.is_a?(File) => true [4] pry(#<Playwright::InputFiles>)> @files.is_a?(Enumerable) => true
set upload file
Paste the output of ruby --version
ruby --version
Step To Reproduce / Observed behavior
causes
File is enumerable. So https://github.com/YusukeIwaki/playwright-ruby-client/blob/bb3ddf54c292a348d538f0f666c35ecc5f4472e1/lib/playwright/input_files.rb#L7 this doesn't work as expected.
Expected behavior
set upload file
Environment
Paste the output of
ruby --version