-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hello.
I'm using the webdriver package in the Rcrawler package and on its own to try to log on and scrape websites for personal use that I have accounts with. I have no problem with the session$findElement() function in webdriver when I go to sites that don't require authentication but can't seem to find similar elements when I log onto sites requiring authentication.
For instance, I have a Facebook account and am interested in scraping Facebook marketplace to better locate some items I would like to purchase. Rcrawler has the useful function "LoginSession()" which lets one log into sites such as Facebook marketplace that require authentication if the user enters the css selectors for the entry fields for the user's name and password and the button to click when done when the authentication popup screen loads up. If I use the development tools from a standard web browser on the following site:
https://www.facebook.com/marketplace
I can tell that the input email element is:
"input[type='text']"
the input password element is:
"input[type='password']"
and the button to click when the user is done entering their credentials is (although not as certain):
"[data-visualcompletion='ignore']"
And have verified those css selectors using document.querySelector() for all of those selectors with the console on the developmental tools site of the web browsers I used to access the Facebook Marketplace. However, Neither Rcrawler nor the webdriver package seemed to be able to locate those elements using the above selectors which prevents me from logging on an scraping that site.
Is there something I'm not doing correctly to be able to access elements to authenticate on sites with webdriver or Rcrawler that require authentication or is it some limitation of webdriver/phantomJS preventing me from doing so?
Thank you.