在 Facebook 的“Whats in your mind”中输入值使用 WAIN 的文本框

发布于 2024-10-06 03:55:20 字数 344 浏览 0 评论 0原文

这是我的问题:

我必须在一天中的不同时间通过 5-10 次不同的登录发布一些短语。 据我所知,对于 facebook api,我将不得不创建 10 个帐户。 (如果我错了请纠正我)。

所以我要和瓦廷一起去。我的问题是如何在主页的“你的想法”框中输入一些短语,然后按提交?

ie.TextField(Find.ByName("status")).Focus(); ie.TextField(Find.ByClass("Mentions_Input")).TypeText("Hello");

我尝试了这段代码,但这似乎不起作用。 任何帮助、建议、教程、代码示例都会很棒。先感谢您。 问候

Here is my problem:

I have to post some phrases in different times of the day from 5-10 different logins.
As far as i know with facebook api i will have to make 10 accounts. (Correct me if i am wrong).

So i am going with Watin. My problem is how will have enter some phrase in the "What's in your mind" box on the homepage and then press submit ??

ie.TextField(Find.ByName("status")).Focus();
ie.TextField(Find.ByClass("Mentions_Input")).TypeText("Hello");

I tried this code but this does not seems to be working.
Any help,suggestion,tutorial,code sample would be great. Thank you in advance.
Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

你又不是我 2024-10-13 03:55:21

您应该使用 FaceBook API,而不是依赖 X 浏览器来完成肮脏的工作,因为您无法确定文本框的类名在所有浏览器中保持相同......

至少使用 FB API 您不必乱搞一整天都和 Spy++ 在一起:(

You should use the FaceBook API instead of relying on X browser to do the dirty job, as you cant be sure the classname for the textbox stays the same across all browsers....

At least using the FB API you dont have to fiddle up all day with Spy++ :(

旧城烟雨 2024-10-13 03:55:21

我遇到了这个问题,但这有效......

        using (IE ie = new IE(facebookUrl))
        {
            ie.TextField(Find.ByName("xhpc_message")).Focus();
            ie.TextField(Find.ByName("xhpc_message")).TypeTextQuickly(numText);
            ie.Button(Find.ByValue("Share")).Click();
        }

为了在下面等待快速输入,我提供了一个链接来解释我的代码的 .TypeTextQuickly(numText) 位。

http://blog.dbtracer.org/ 2010/08/05/speed-up-typing-text-with-watin/

I had this problem but this works....

        using (IE ie = new IE(facebookUrl))
        {
            ie.TextField(Find.ByName("xhpc_message")).Focus();
            ie.TextField(Find.ByName("xhpc_message")).TypeTextQuickly(numText);
            ie.Button(Find.ByValue("Share")).Click();
        }

For the quick typing for waitin below I have provided a link that explains the .TypeTextQuickly(numText) bit of my code.

http://blog.dbtracer.org/2010/08/05/speed-up-typing-text-with-watin/

思慕 2024-10-13 03:55:21

但是创建 10 个帐户似乎不是一个好的选择:(。facebook 帐户也可能会增加。所以如果我使用 facebook api 那么解决方案不会持久。

我同意你的观点,自动化不好。但是脚本将在我只需要访问该文本框或任何内容即可发布墙。
(我已经完成了脚本的登录部分)。

--> 因为您无法确定文本框的类名在所有浏览器中保持相同......

是的,我同意。但后来我觉得 Watin 太强大了,有这么多选择。 Watin 将会有一些解决这个问题的方法。

-->至少使用 FB API,您不必整天摆弄 Spy++ :(

Spy++ 适用于浏览器?我认为不行。

我的问题:
问:是否有任何第 3 方 API 可以获取我的凭据并在我的墙上发布?

我现在不会和瓦廷一起去。我仍在寻找最佳解决方案。

But making 10 accounts doesnot seems a good option :(. The facebook accounts might also increase. So if i use facebook api then the solution will not be long lasting.

I agree with you that automation is bad. But the script will run in the background on my specified browser. I just need to access that textbox or whatever it is to post a wall.
(I am done with the login part of the script).

-->as you cant be sure the classname for the textbox stays the same across all browsers....

Yes, i agree. But then i thought that Watin is soo powerful with so many options. There will be some solution to this problem in Watin.

--> At least using the FB API you dont have to fiddle up all day with Spy++ :(

Spy++ works for browsers ? i think not.

My Question:
Q: Is there any 3rd party api that just takes my credentials and post on my wall ??

I am not going with Watin right now. I am still searching for the best solution.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文