Facebook test accounts using selenium - failing to log in my fake users

后端 未结 1 1779
耶瑟儿~
耶瑟儿~ 2021-01-06 17:52

I am programmatically creating test accounts, and then immediately trying to log in w/ them using a selenium driven browser. Unfortunately, the browser is just redirected t

相关标签:
1条回答
  • 2021-01-06 18:15

    Visit Facebook home page before trying to visit login url:

    visit "https://www.facebook.com"
    visit @fake_user.login_url
    

    I haven't checked the headers, but I guess Facebook sets some cookies that are needed to log in.

    0 讨论(0)
提交回复
热议问题