开发者

Input value in Facebook's "Whats in your mind" textbox using WATIN

开发者 https://www.devze.com 2023-01-28 19:33 出处:网络
Here is my problem: I have to post some phrases in different times of the day from 5-10 different logins.

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();开发者_StackOverflow社区 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


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++ :(


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/


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消