简体   繁体   中英

RSelenium unknown error when clickElement() function is called

I want to scrape holidayiq.com hotel review data, for example hotel review link , using R package 'Rvest'. 'RSelenium' is used for clicking on the "Next >" link, to visit further pages.

Whenever I use the code nxtButton = mybrowser$findElement(using = 'css selector', "#next") nxtButton$clickElement() to visit the next page I get the following error:

Snapshot of error

Please tell me how to deal with this error. Thanks for help in advance.

The below code should work.

Your css element is not found in the page.

nxtButton = mybrowser$findElement(using = 'css selector', "#submit_form") nxtButton$clickElement()

I guess you wanted to click the button NEXT in the right side form in the link provided above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM