如何通过C#的Google帐户以编程方式退出? [英] How to sign out programatically from Google account in C#?

查看:76
本文介绍了如何通过C#的Google帐户以编程方式退出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.我是Prabhu.

我正在开发机器人应用程序,但没有设法退出.我该怎么办?

我已经自动执行以下步骤:

1.打开gmail登录页面.
2.自动输入用户名和密码.
3.自动输入/单击登录按钮.

现在我要执行第4步:

4.现在,我想选择收件箱或已发送邮件或垃圾邮件或撰写邮件或退出.

谁知道怎么做?

Hi. I''m Prabhu.

I''m developing a bot application and I didn''t manage to sign out. What should I do for that?

I have already automated following steps:

1. Open the gmail sign in page.
2. Automatically enter the username and password.
3. Automatically Enter/click the sign in button.

And now I want to implement the 4th step:

4. Now i wanna choose inbox or sent items or spam or compose mail or sign out.

Who knows how to do it?

推荐答案

Prabhu.

我建议您使用Http Analyzer来确定需要实现的内容.登出期间在分析器中了解请求,您将发现如何以实际的方式处理Web请求.

我设法跟踪了第一个注销请求.这是分析仪的信息:

Hi, Prabhu.

I advice you to use Http Analyzer to figure out what you need to implement. Learn requests in analyzer during signing out and you''ll find out how to do it pragramatically with your web requests.

I managed to track the first request to sign out. And here is the information from analyzer:

(Request-Line):GET /mail/?logout&hl=en HTTP/1.1
Host:mail.google.com



以这种方式继续.而且不要忘记cookie.处理此类任务后,我花了一些时间来处理Cookie.

如果我的解决方案对您有帮助,请接受并投票.



Proceed on in this manner. And don''t forget about cookies. I spent a tone of time working with cookies when I have dealt with this sort of tasks.

If my solution will help you please accept it and vote for it.


这篇关于如何通过C#的Google帐户以编程方式退出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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