HashNuke / hound

Elixir library for writing integration tests and browser automation

Home Page:http://hexdocs.pm/hound

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upload multiple files

ihorkatkov opened this issue · comments

Hey guys. I developed the function for multiple file upload. Would be great if the similar feature would be added.

def attach_files(element, file_pathes) do
  import Hound.RequestUtils

  session_id = Hound.current_session_id
  make_req(:post, "session/#{session_id}/element/#{element}/value",
          %{value: [Enum.join(file_pathes, "\n")]}
  )
end