How to test facebook likes using webdriver without being flagged as a bot?



  • I've tried registering test accounts to test facebook likes on my site, but running tests repeatedly flags the accounts as spam. Facebook allows fake users for FB apps, but not external apps.

    Are there any workarounds? How do you do do selenium testing on facebook?



  • It seems to me that you are trying to test Facebook API along with your site. Think of it this way: your site has to load "like" button and make sure that HTTP request is sent once a user clicks on it. That's the responsibility of your site. Facebook part is to process this HTTP request and generate updates to a news feed or whatever. Now, imagine that your test finds a button, clicks on it, request is sent, but news feed is not updated. Is the problem with your site here? Or with Facebook? Is the purpose of a test to find problems in Facebook API and notify their customer support team?

    If I were you, I would concentrate on responsibilities of your site. A question comes up, "How would one make sure that HTTP request is being sent without actually sending it, so that your test account is not blocked?" Well, one option you have is to use HTTP proxy from your test and set it up to intercept requests to Facebook. Take a look at http://fiddler2.com/fiddlercore, it should be possible to achieve with this library.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2