I am trying to download a file from Watir but I don't want to use the loop sleep approach.
I would rather at the last moment of the interaction, recreate the session Watir has on the webpage and use another library, for example Typhoeus.
Typhoeus uses curl and can use cookies from a file, nonetheless, Watir generates a Hash Array, and if I ask to save it, it saves it as a YAML file.
Is there a faster way to convert it?
Another article in StackOverflow said that curl uses Mozilla style cookie files.
So, if your Watir instance is
browserand the file to which you are going to write to isfileyou can doThen you can tell Typhoeus to use the contents of
fileto keep navigating using the same cookies.