Need help

Discussions and Tech Support related to the iMacros Google 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
Post Reply
buzz
Posts: 2
Joined: Thu Oct 06, 2016 6:08 am

Need help

Post by buzz » Thu Oct 06, 2016 6:15 am

Hi

I am new to iMacro.

Have created a macro to help fill in a form in Facebook Business Manager.

The macro works fine for selecting the page, age in the drop down but when I type in a Country and the search returns a hit and I click on the this hit the macro does not 1. do the search and 2 does not record me hitting Enter.

Example - Type NZ and FB will return New Zealand and I can select that.

When I run the Macro it types NZ but then does nothing.

Any help appreciated.

thanks
iimfun
Posts: 239
Joined: Tue Jul 19, 2016 1:06 pm

Re: Need help

Post by iimfun » Thu Oct 06, 2016 1:27 pm

The macro posted below works on the 'About' page. You can try it on a form in Facebook Business Manager too.

Code: Select all

SET !EXTRACT_TEST_POPUP NO
TAG POS=1 TYPE=LABEL ATTR=TXT:"Country" EXTRACT=HTM
SET idI EVAL("'{{!EXTRACT}}'.match(/for=\"(.+?)\"/)[1];")
SET !EXTRACT NULL

TAG XPATH="id('{{idI}}')" EXTRACT=HTM
SET idL EVAL("'{{!EXTRACT}}'.match(/aria-controls=\"(.+?)\"/)[1];")
SET !EXTRACT NULL

EVENT TYPE=CLICK SELECTOR="#{{idI}}" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="#{{idI}}" CHARS="NZ"
WAIT SECONDS=0.5
EVENT TYPE=CLICK SELECTOR="#{{idL}}>li:nth-of-type(1) span" BUTTON=0
buzz
Posts: 2
Joined: Thu Oct 06, 2016 6:08 am

Re: Need help

Post by buzz » Fri Oct 07, 2016 3:15 am

Thanks but this did not work... Returns in the pop up "#EANF#"

The HTML does not appear on the page until you have selected from the pop up. So the macro runs but it cannot grab the text.

Any other ideas appreciated.

thanks

Bill

Attached is what it looks like. iMacro records the key strokes.. Then there is a pop up you select. When you select it iMacro records nothing.
Attachments
Screen Shot 2016-10-07 at 2.26.13 PM.png
iimfun
Posts: 239
Joined: Tue Jul 19, 2016 1:06 pm

Re: Need help

Post by iimfun » Fri Oct 07, 2016 8:16 am

I can't test my macro on the page you are. So record the following steps:

1) Click the 'Country' label (with 'Conventional recording mode');
2) Type something in the 'Country' input (with 'Experimental event recording mode').

I should look at this code for further suggestions.
Post Reply