Not recognising delete button

Discussions and Tech Support specific to the iMacros for Chrome extension.
Forum rules
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
lam
Posts: 28
Joined: Thu May 19, 2016 2:01 am

Not recognising delete button

Post by lam » Thu May 19, 2016 2:15 am

I recorded a macro, but when running the code stops on line 6 and i suspect it does not recognise the "delete post" part of the pop-up box. It does recognize it if i use the "cancel" part of the pop-up box??

RuntimeError: element A specified by TXT:Delete<SP>Post was not found, line: 6


VERSION BUILD=8350307 RECORDER=CR
URL GOTO=https://www.facebook.com/groups/4459424 ... =available
TAG POS=1 TYPE=A ATTR=ID:u_0_2y
TAG POS=2 TYPE=DIV ATTR=TXT:More<SP>options
TAG POS=2 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=A ATTR=TXT:Delete<SP>Post

Any sugestons? thanks
Windows 7
Firefox 47
iMacros add on for firefox
VERSION BUILD=8970419
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Not recognising delete button

Post by chivracq » Thu May 19, 2016 1:43 pm

lam wrote:I recorded a macro, but when running the code stops on line 6 and i suspect it does not recognise the "delete post" part of the pop-up box. It does recognize it if i use the "cancel" part of the pop-up box??

RuntimeError: element A specified by TXT:Delete<SP>Post was not found, line: 6

Code: Select all

VERSION BUILD=8350307 RECORDER=CR
URL GOTO=https://www.facebook.com/groups/445942472116497/for_sale_search/?forsalesearchtype=all&query=***%20mcgill&referral_surface=direct_link&availability=available
TAG POS=1 TYPE=A ATTR=ID:u_0_2y
TAG POS=2 TYPE=DIV ATTR=TXT:More<SP>options
TAG POS=2 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=A ATTR=TXT:Delete<SP>Post
Any sugestons? thanks
FCIM...! :mrgreen:
=> iMacros for CR v8.3.5, CR50...?, OS...?

Hum, possibly the Page needs the 'ONDIALOG' Command for that 'Delete Post' Statement to work, but 'ONDIALOG' is not supported by iMacros for CR. You could try running/re-recording your Script on FF or IE...
If the Link is always located at the same place, you could try using the 'X/Y CLICK' Mode.
Try adding a mini-'WAIT' Statement before the incriminated Statement.

I think the best Option would be to run/re-record your Macro on FF, there it will probably work... (could use the EVENT Mode as well...), even if I fear you will encounter some further Difficulty for the 2nd Loop/Element as "ID:u_0_2y" looks Dynamic to me, but you'll be able to solve that Pb using Wildcards, or other Attributes or Relative Positioning, and I had a look at your Page, all the Jewellery Spam Posts that I reckon you want to delete are the same, that will make the Process easier...

If you don't come out by yourself, I'm willing to have a closer look and I will probably get a working Macro (for FF at least, iMacros for CR is very limited compared to FF/IE/iMB) as I'm always willing to help against Spam (I usually don't provide any Scripts for FB as they could easily be (mis)used for Spamming, like your Poster probably did...), I will then need to join your FB-Group and you can make me temporarily Co-Admin of your Group... :idea:

Good luck anyway...!
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
lam
Posts: 28
Joined: Thu May 19, 2016 2:01 am

Re: Not recognising delete button

Post by lam » Thu May 19, 2016 3:50 pm

Its the same in IE also

VERSION BUILD=10.2.26.4235
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://www.facebook.com/groups/4459424 ... =available
TAG POS=54 TYPE=A ATTR=HREF:https://www.facebook.com/groups/4459424 ... =available#
TAG POS=2 TYPE=DIV ATTR=TXT:More<SP>options
TAG POS=2 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=BUTTON:SUBMIT FORM=ACTION:/ajax/timeline/delete?identifier=S%3A_I1461192196%3A1099407500103321&location=9&story_dom_id=mall_post_1099407500103321&render_location=45&is_notification_preview=0 ATTR=TXT:Delete<SP>Post

error is;

Error -1300: Cannot find HTML element of type "BUTTON:SUBMIT" with attribute(s) "TXT:Delete Post".. Line 8: TAG POS=1 TYPE=BUTTON:SUBMIT FORM=ACTION:/ajax/timeline/delete?identifier=S%3A_I1461192196%3A1099407500103321&location=9&story_dom_id=mall_post_1099407500103321&render_location=45&is_notification_preview=0 ATTR=TXT:Delete<SP>Post
Windows 7
Firefox 47
iMacros add on for firefox
VERSION BUILD=8970419
lam
Posts: 28
Joined: Thu May 19, 2016 2:01 am

Re: Not recognising delete button

Post by lam » Thu May 19, 2016 3:57 pm

I did use a wait statement, but that did not help.

I tried to delete all posts on the main page, but that would not work in both browsers either.
Windows 7
Firefox 47
iMacros add on for firefox
VERSION BUILD=8970419
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Not recognising delete button

Post by chivracq » Thu May 19, 2016 4:01 pm

lam wrote:Its the same in IE also

Code: Select all

VERSION BUILD=10.2.26.4235
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://www.facebook.com/groups/445942472116497/for_sale_search/?forsalesearchtype=all&query=stephen+mcgill&referral_surface=direct_link&availability=available
TAG POS=54 TYPE=A ATTR=HREF:https://www.facebook.com/groups/445942472116497/for_sale_search/?forsalesearchtype=all&query=stephen+mcgill&referral_surface=direct_link&availability=available#
TAG POS=2 TYPE=DIV ATTR=TXT:More<SP>options
TAG POS=2 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=BUTTON:SUBMIT FORM=ACTION:/ajax/timeline/delete?identifier=S%3A_I1461192196%3A1099407500103321&location=9&story_dom_id=mall_post_1099407500103321&render_location=45&is_notification_preview=0 ATTR=TXT:Delete<SP>Post
error is;

Error -1300: Cannot find HTML element of type "BUTTON:SUBMIT" with attribute(s) "TXT:Delete Post".. Line 8: TAG POS=1 TYPE=BUTTON:SUBMIT FORM=ACTION:/ajax/timeline/delete?identifier=S%3A_I1461192196%3A1099407500103321&location=9&story_dom_id=mall_post_1099407500103321&render_location=45&is_notification_preview=0 ATTR=TXT:Delete<SP>Post
Okay..., but that looks more promising though as several parts in the incriminated Statement look Dynamic to me as well... Try replacing them with Wildcards like:

Code: Select all

TAG POS=1 TYPE=BUTTON:SUBMIT FORM=ACTION:/ajax/timeline/delete?identifier=*&story_dom_id=mall_post_*&is_notification_preview=0 ATTR=TXT:Delete<SP>Post
And you can even try to remove as well the complete 'FORM' Parameter, it is often not needed...:

Code: Select all

TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=TXT:Delete<SP>Post
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
lam
Posts: 28
Joined: Thu May 19, 2016 2:01 am

Re: Not recognising delete button

Post by lam » Thu May 19, 2016 5:00 pm

Yes that worked replacing the bit of code!

I deleted several posts pressing play each time, but tried in a loop and it stops on the 3rd. It seems not to refresh and the page is still on a deleted post so FB throws up an error "There was an error while processing your request".

error is on line 6

Error -1300: Cannot find HTML element of type "DIV:" with attribute(s) "TXT:More options".. Line 6: TAG POS=2 TYPE=DIV ATTR=TXT:More<SP>options
Windows 7
Firefox 47
iMacros add on for firefox
VERSION BUILD=8970419
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Not recognising delete button

Post by chivracq » Thu May 19, 2016 5:19 pm

lam wrote:Yes that worked replacing the bit of code!

I deleted several posts pressing play each time, but tried in a loop and it stops on the 3rd. It seems not to refresh and the page is still on a deleted post so FB throws up an error "There was an error while processing your request".

error is on line 6

Error -1300: Cannot find HTML element of type "DIV:" with attribute(s) "TXT:More options".. Line 6: TAG POS=2 TYPE=DIV ATTR=TXT:More<SP>options
OK, good to hear it's progressing...!

I guess you just want a quick and dirty Script to use once, to delete all those Spammy Posts, you can add '!ERRORIGNORE' to force iMacros to ignore Errors, maybe combined with a forced Refresh of the Page, either using 'REFRESH' or 'URL GOTO', or what I would do is make 3 Blocks of Code (Copy&Paste the existing one x2) and force a Refresh only once for 3 Posts to delete. And you could shorten '!TIMEOUT_STEP' to "1" or "0" to speed up Execution. Like that if one Post cannot be deleted, the Macro keeps running (and doing nothing) until the Page gets refreshed/reloaded at the next Loop.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
lam
Posts: 28
Joined: Thu May 19, 2016 2:01 am

Re: Not recognising delete button

Post by lam » Thu May 19, 2016 7:39 pm

I can actually use this for other users as well i hope, just change the name i guess!

I have not got it to do 9 loops. So where do i put the !ERRORIGNORE, at the very end?

Cheers
Windows 7
Firefox 47
iMacros add on for firefox
VERSION BUILD=8970419
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Not recognising delete button

Post by chivracq » Thu May 19, 2016 7:59 pm

lam wrote:I can actually use this for other users as well i hope, just change the name i guess!

I have not got it to do 9 loops. So where do i put the !ERRORIGNORE, at the very end?

Cheers
Yep, I saw it was working, you only have about the last 6 months left to delete...

Beh..., no...!, not at the end but at the beginning...!, or at least just before a place in your Script that might error out and stop the Macro... Well you can toggle it ON/OFF. It would be useless at the end of your Macro, because (nearly) all (Built-in) Vars are reset between 2 Loops, except '!LOOP' of course.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
lam
Posts: 28
Joined: Thu May 19, 2016 2:01 am

Re: Not recognising delete button

Post by lam » Thu May 19, 2016 8:14 pm

It does not like that, is it stated correct !ERRORIGNORE?

Error -1100: Can not parse macro line: !ERRORIGNORE
Windows 7
Firefox 47
iMacros add on for firefox
VERSION BUILD=8970419
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Not recognising delete button

Post by chivracq » Thu May 19, 2016 8:22 pm

lam wrote:It does not like that, is it stated correct !ERRORIGNORE?

Error -1100: Can not parse macro line: !ERRORIGNORE
Tja...!, check the Wiki for the correct Syntax! When I mention a Command, it doesn't mean I'm giving you the exact complete Statement to use..., otherwise I would have posted the Statement/Macro using the ']code[' Meta-Tags... :idea:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
lam
Posts: 28
Joined: Thu May 19, 2016 2:01 am

Re: Not recognising delete button

Post by lam » Thu May 19, 2016 10:34 pm

Got up to 25 deletes now with a loop, its the second time IE crashed at this amount

Any more suggestions thanks

VERSION BUILD=10.2.26.4235
TAB T=1
TAB CLOSEALLOTHERS
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
URL GOTO=https://www.facebook.com/groups/4459424 ... =available
TAG POS=53 TYPE=A ATTR=HREF:https://www.facebook.com/groups/4459424 ... =available#
TAG POS=2 TYPE=DIV ATTR=TXT:More<SP>options
TAG POS=2 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=BUTTON:SUBMIT FORM=ACTION:/ajax/timeline/delete?identifier=*&story_dom_id=mall_post_*&is_notification_preview=0 ATTR=TXT:Delete<SP>Post
REFRESH
Windows 7
Firefox 47
iMacros add on for firefox
VERSION BUILD=8970419
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Not recognising delete button

Post by chivracq » Thu May 19, 2016 11:37 pm

lam wrote:Got up to 25 deletes now with a loop, its the second time IE crashed at this amount

Any more suggestions thanks

Code: Select all

VERSION BUILD=10.2.26.4235
TAB T=1
TAB CLOSEALLOTHERS
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
URL GOTO=https://www.facebook.com/groups/445942472116497/for_sale_search/?forsalesearchtype=all&query=stephen%20mcgill&referral_surface=direct_link&availability=available
TAG POS=53 TYPE=A ATTR=HREF:https://www.facebook.com/groups/445942472116497/for_sale_search/?forsalesearchtype=all&query=stephen%20mcgill&referral_surface=direct_link&availability=available#
TAG POS=2 TYPE=DIV ATTR=TXT:More<SP>options
TAG POS=2 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=BUTTON:SUBMIT FORM=ACTION:/ajax/timeline/delete?identifier=*&story_dom_id=mall_post_*&is_notification_preview=0 ATTR=TXT:Delete<SP>Post
REFRESH
Hum, no idea about the IE Crash every 25 Loops, I don't use IE...

But, mini-Rmk, you don't need both 'URL GOTO' and 'REFRESH' for each time you delete one Post, they do the same and 'URL GOTO' is more reliable if you loop your Macro.
I had suggested that you x3 the Block of Code that is actually doing the Post Delete in each Loop, FB-Pages are always very heavy to load, with lots of underwater JavaScript...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
lam
Posts: 28
Joined: Thu May 19, 2016 2:01 am

Re: Not recognising delete button

Post by lam » Fri May 20, 2016 11:41 pm

OK, thanks to chivracq for sorting my problem, i got all deleted and other users posts too.

I've got the bug (lol) now!!
Windows 7
Firefox 47
iMacros add on for firefox
VERSION BUILD=8970419
lam
Posts: 28
Joined: Thu May 19, 2016 2:01 am

Re: Not recognising delete button

Post by lam » Fri May 20, 2016 11:47 pm

Trying on the main page of the group to delete posts, but the run is not reconconising the delete post command on the pop up box, any suggestions?

VERSION BUILD=10.2.26.4235
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://www.facebook.com/groups/445942472116497/
TAG POS=55 TYPE=A ATTR=HREF:https://www.facebook.com/groups/445942472116497/#
TAG POS=2 TYPE=DIV ATTR=TXT:Delete<SP>Post
TAG POS=1 TYPE=BUTTON:SUBMIT FORM=ACTION:/ajax/groups/mall/delete.php ATTR=TXT:Delete

Error -1300: Cannot find HTML element of type "DIV:" with attribute(s) "TXT:Delete Post".. Line 6: TAG POS=2 TYPE=DIV ATTR=TXT:Delete<SP>Post
Attachments
post_del.JPG
shoes the pop-up
Windows 7
Firefox 47
iMacros add on for firefox
VERSION BUILD=8970419
Post Reply