Almost able to post to Facebook, what am I missing?

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Chris_Just_Chris
Posts: 6
Joined: Mon Aug 04, 2014 6:43 pm

Almost able to post to Facebook, what am I missing?

Post by Chris_Just_Chris » Mon Aug 04, 2014 6:56 pm

I am trying to schedule a post for the future on a a facebook page where I am admin.

To keep it simple, here is my code assuming you are already logged in to FB and on your page.

For debugging, this code actually works for me with 2 exceptions (noted in macro comments also):

The text window that defaults to "what have you been up to (or something like that)" needs to be clicked before anything will happen. I can't figure out how to get this working except to manually click in there before the tag times out. Obviously I am only manually clicking in order to see that the rest works properly.

It's the same situation with the little clock, which needs to be clicked before the last 2 lines will run.

I have tried tagging divs and a few different ways, including tagging photo/video then tagging status (which would open it, but it doesn't work properly for me) and also tagx & tagy.

Here's my code, any ideas?

Code: Select all

VERSION BUILD=8820413 RECORDER=FX
'
' Any page where you are an administrator
' URL GOTO=https://www.facebook.com/YOURPAGEHERE
'
''' PROBLEM AREA : "What have you been up to?" needs to be clicked before below will run
TAG POS=1 TYPE=TEXTAREA FORM=ID:* ATTR=NAME:xhpc_message_text CONTENT=abc
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:* ATTR=NAME:future_dateIntlDisplay CONTENT=8/5/2014
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:* ATTR=NAME:future_time_display_time CONTENT=10:05<SP>pm
'
''' PROBLEM AREA : CLOCK NEEDS TO BE CLICKED BEFORE THE REST WILL RUN
TAG POS=1 TYPE=BUTTON FORM=ID:* ATTR=TXT:Schedule
TAG POS=2 TYPE=A ATTR=TXT:Close
Thanks in advance for any insights!!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Almost able to post to Facebook, what am I missing?

Post by chivracq » Mon Aug 04, 2014 7:16 pm

FCIM...! :mrgreen:

You don't mention if stg gets recorded for the 2 "Problem Areas", I guess it does and you don't mention why it is a Problem..., I guess because you get some RuntimeError about "Element not found"...

If you record several times the same Actions on your Page after a Refresh, you will end up with different Element ID's which get dynamically generated by FB. You then need to replace the changing Part with Wildcards (like you've done with "FORM=ID:*") or use the Full HTML Recording Mode to identify some other Attribute(s) that you can then use in your Macro.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Chris_Just_Chris
Posts: 6
Joined: Mon Aug 04, 2014 6:43 pm

Re: Almost able to post to Facebook, what am I missing?

Post by Chris_Just_Chris » Mon Aug 04, 2014 8:13 pm

Oops! Sorry about fcim, first post. I will do better later (on a bus now) but it the imacros version in the code, on win7 pro and the newest FF, 31 I think? I will be working with it more later at home on win 8.1 also.

Like you said, I am avoiding IDs for this macro. The problem I am having is I can't get the focus to the textbox no matter what I try, without dynamic IDs being involved.

Will also post exact error text when I get to a pc in a few hours but yes, it was typical not found type of error.
Last edited by Chris_Just_Chris on Tue Aug 05, 2014 2:36 am, edited 1 time in total.
Chris_Just_Chris
Posts: 6
Joined: Mon Aug 04, 2014 6:43 pm

Re: Almost able to post to Facebook, what am I missing?

Post by Chris_Just_Chris » Tue Aug 05, 2014 2:26 am

Imacros Version: 8.8.2
Firefox 31.0
Windows 8.1

I have managed to work out the second problem area using recording in complete HTML mode.

I am still at a loss as to how to get past the first hurdle. even recording in complete HTML mode, nothing is recorded when I make the desired action (clicking into the textbox where the status update will go). It seems like there's something in the source that's a bit over my head, and I cannot figure out how to make it happen.

Updated code: works fine IF I manually click into the status textarea before it times out :(

Code: Select all

VERSION BUILD=8820413 RECORDER=FX
'
' Any page where you are an administrator
' URL GOTO=https://www.facebook.com/YOURPAGEHERE
'
''' PROBLEM AREA : "What have you been up to?" needs to be clicked before below will run
TAG POS=1 TYPE=TEXTAREA FORM=ID:* ATTR=NAME:xhpc_message_text CONTENT=abc
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:* ATTR=NAME:future_dateIntlDisplay CONTENT=8/5/2014
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:* ATTR=NAME:future_time_display_time CONTENT=10:05<SP>pm
TAG POS=1 TYPE=SPAN ATTR=TXT:Add<SP>date
TAG POS=1 TYPE=BUTTON FORM=ID:* ATTR=TXT:Schedule
TAG POS=2 TYPE=A ATTR=TXT:Close
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Almost able to post to Facebook, what am I missing?

Post by chivracq » Tue Aug 05, 2014 11:26 am

This one works for me on some FB Community Page I'm the Admin of:

Code: Select all

VERSION BUILD=8820413 RECORDER=FX
TAB T=1
'URL GOTO=https://www.facebook.com/pages/My_FB_Community_Page...

'TAG POS=1 TYPE=TEXTAREA FORM=ID:* ATTR=NAME:xhpc_message_text CONTENT=abc
TAG POS=1 TYPE=TEXTAREA FORM=ID:* ATTR=ID:* CONTENT=Mini-test
WAIT SECONDS=1

TAG POS=1 TYPE=SPAN ATTR=TXT:Add<SP>date
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:* ATTR=NAME:future_dateIntlDisplay CONTENT=8/5/2014
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:* ATTR=NAME:future_time_display_time CONTENT=18:05<SP>pm
WAIT SECONDS=1
TAG POS=1 TYPE=SPAN ATTR=TXT:Add<SP>date
WAIT SECONDS=1
TAG POS=1 TYPE=BUTTON FORM=ID:* ATTR=TXT:Schedule
WAIT SECONDS=1
TAG POS=2 TYPE=A ATTR=TXT:Close
Tested on iMacros v8.8.2 for FF, Pale Moon v24.7.0 (=FF31), Win7-64.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Chris_Just_Chris
Posts: 6
Joined: Mon Aug 04, 2014 6:43 pm

Re: Almost able to post to Facebook, what am I missing?

Post by Chris_Just_Chris » Tue Aug 05, 2014 12:20 pm

Work machine now:
iMacros 8.8.2
FF 31.0
Win 7 64

RuntimeError: element INPUT specified by NAME:future_dateIntlDisplay was not found, line 11 (Error code: -921)

I downloaded Pale Moon and gave it a shot.

Got the same error.

Maybe your page is still on the old layout? I was prompted a few weeks ago to switch a bunch of pages over to the new timeline.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Almost able to post to Facebook, what am I missing?

Post by chivracq » Tue Aug 05, 2014 5:09 pm

Hum, strange, because I kept that "NAME:future_dateIntlDisplay" from you as it was working already, but I had to add a "TAG POS=1 TYPE=SPAN ATTR=TXT:Add<SP>date" just before as I was getting indeed the same Error Msg...

Yep I remember as well a few weeks ago about the "New Timeline", but I think I said Yes...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Chris_Just_Chris
Posts: 6
Joined: Mon Aug 04, 2014 6:43 pm

Re: Almost able to post to Facebook, what am I missing?

Post by Chris_Just_Chris » Thu Aug 07, 2014 4:58 am

I managed to get it closer to working by tagging a relative div, and then the behavior was different with the date picker and time, there were new hidden fields. So I messed around with which div I tagged and got it to work, but then it didn't work on another page.

I'm abandoning this particular project (FB will just change something by the time I figure it out anyway), but wanted to thank you for your time and help.
Post Reply