How to submit login form in Rvest package w/o button argument : <p>I am trying to scrape a web page that requires authentication using html_session() &amp; html_form() from the rvest package.
I found this e.g. provided by Hadley Wickham, but am not able to customize it to my case.</p>

<pre><code>united &lt;- html_session("http://www.united.com/")
account &lt;- united %&gt;% follow_link("Account")
login &lt;- account %&gt;%
         html_nodes("form") %&gt;%
         extract2(1) %&gt;%
         html_form() %&gt;%
         set_values(
                `ctl00$ContentInfo$SignIn$onepass$txtField` = "GY797363",
                `ctl00$ContentInfo$SignIn$password$txtPassword` = password)
account &lt;- account %&gt;% 
submit_form(login, "ctl00$ContentInfo$SignInSecure")
</code></pre>

<p>In my case, I can't find the values to set in the form, hence I am trying to give the user and pass directly:
    set_values("email","password")</p>

<p>I also don't know how to refer to submit button, so I tried:
    submit_form(account,login)</p>

<p>The error I got for the submit_form function is:
    Error in names(submits)[[1]] : subscript out of bounds</p>

<p>Any idea on how to go about this is appreciated. 
Thank you</p>
