title: How scrape text from webpage that requires interaction in r
body: <p>I am trying to scrape reviews from a webpage to determine word frequency. However, only partial reviews are given when the review is longer. You have to click on "More" to get the webpage to show the full review. Here is the code I am using to extract the text of the review. How can I "click" on more to get the full review? </p>
  
  <pre><code>library(rvest)
  
  tripAdvisorURL &lt;- "https://www.tripadvisor.com/Hotel_Review-g33657-d85704- 
  Reviews-Hotel_Bristol-Steamboat_Springs_Colorado.html#REVIEWS"
  
  webpage &lt;-read_html(tripAdvisorURL)
  
  reviewData &lt;- xml_nodes(webpage,xpath = '//*[contains(concat( " ", @class, " 
  " ), concat( " ", "partial_entry", " " ))]')
  
  head(reviewData)
  
  xml_text(reviewData[[1]])
  
  [1] "The rooms were clean and we slept so good we had room 10 and 12 we 
  didn’t use 12 but it joins 10 .kind of strange but loved the hotel ..me 
  personally I would take the hot tub out it was kinda old..the lady 
  that...More"
  </code></pre>