ropensci / RSelenium

An R client for Selenium Remote WebDriver
https://docs.ropensci.org/RSelenium
344 stars 81 forks source link

chrome profile sign in? #233

Open gmanova opened 4 years ago

gmanova commented 4 years ago

hi, when passing the arguments to getChromeProfile(), checking the actual directory in app data - there is no user name, or profile indicator - what should be the 2nd argument? the google profile name? full gmail account?

when i try either, say:

cprof <- getChromeProfile("C:\Users\myname\AppData\Local\Google\Chrome\User Data\Default","myname")

then trying to navigate (to something which previously worked fine), i get:

remDr$navigate("https://ads.google.com/aw/keywordplanner/home")

Error in checkError(res) : Undefined error in httr call. httr output: length(url) == 1 is not TRUE

obviously the URL is fine.

any ideas? i did not find this issue in previous issues here (did find it on SOF but with Selenium (python), not RSelenium.

thanks, Guy

furrrpanda commented 4 years ago

I believe you need to use escape the slash in R.

cprof <- getChromeProfile("C:\Users\myname\AppData\Local\Google\Chrome\User Data\Default","myname")