Method: Playwright::Page#set_input_files

Defined in:
lib/playwright_api/page.rb

#set_input_files(selector, files, noWaitAfter: nil, strict: nil, timeout: nil) ⇒ Object

Sets the value of the file input to these file paths or files. If some of the filePaths are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files.

This method expects selector to point to an [input element](developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside the ‘<label>` element that has an associated [control](developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.



1032
1033
1034
1035
1036
1037
1038
1039
# File 'lib/playwright_api/page.rb', line 1032

def set_input_files(
      selector,
      files,
      noWaitAfter: nil,
      strict: nil,
      timeout: nil)
  wrap_impl(@impl.set_input_files(unwrap_impl(selector), unwrap_impl(files), noWaitAfter: unwrap_impl(noWaitAfter), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
end