rocky
rocky

Reputation: 5004

Use Facebook account in Selenium tests

I'm using selenium for integration tests, so it clicks through our web app, logs into Facebook and do some actions. Facebook started to block account used in those tests and send an email "Did you log in to Facebook from somewhere new?"

All logins are done from same IP, same OS (Linux, Jenkins) and safari browser. I've marked several times that it's me who logged in (well, its jenkins;p). We run those tests every 30 minutes -- sometimes it ok for couple days, sometimes account is blocked right away.

Is there any way to mark an account as 'safe' for such actions?

Update:

Seems test accounts are a way to go -- didn't see them before: https://developers.facebook.com/docs/facebook-login/testing-your-login-flow/.

Upvotes: 3

Views: 221

Answers (1)

andyrandy
andyrandy

Reputation: 73984

For testing purposes, you can use Test Users: https://developers.facebook.com/docs/apps/test-users

You can create/manage them in the App settings or even with the API.

Upvotes: 3

Related Questions