使用Selenium Webdriver自动化Facebook登录 [英] Automating Facebook Login with Selenium Webdriver

查看:1017
本文介绍了使用Selenium Webdriver自动化Facebook登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个面向C#应用程序的Webdriver套件的Facebook登录/注册测试。

I am looking to introduce Facebook login/sign up tests into a Webdriver suite for a C# application.

Facebook开发人员有关于手动验证的文章,但似乎没有引用任何使这些测试自动化的过程。我可以简单地写出所示的步骤,但我想避免在Facebook界面上运行脚本,特别是当涉及到创建测试用户时。

Facebook Developers has an article on manual verification, but does not seem to reference any procedure for automating these tests. I could simply write the steps indicated but I would like to avoid running scripts on the Facebook UI, especially when it involves creating test users.

查看以前的几个答案,看来Facebook几年前已经有了自动化解决方案,但是我无法再找到任何地方的任何地方。

Looking through a few previous answers, it appears that Facebook had an automation solution a few years ago, but I can no longer find any reference to it anywhere.

有没有人有任何经验自动化Facebook Connect登录或注册?您可以分享的任何提示或策略将不胜感激。

Has anyone had any experience automating Facebook Connect login or sign up? Any tips or strategies you can share would be greatly appreciated.

推荐答案

您可能想要做的第一件事是创建测试用户。

The first thing you probably want to do is create test users.

Facebook API可让您轻松实现;

The Facebook API lets you do this easily;

https://developers.facebook.com/docs/graph-api/reference/v2。 0 / app / accounts / test-users

这将给你一个登录URL,这应该导致自动登录,结果删除一个应该有帮助的cookie您避免在您的应用程序中手动登录。

This will give you a login url which should result in automatic login and as result drop a cookie which should help you avoid manual login within your application.

api还允许您创建关系并发布事件

The api also allows you to create relationships and publish events

这篇关于使用Selenium Webdriver自动化Facebook登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆