Search code examples
imacros

Select Month/Gender in Gmail account creation with imacros


Trying to automate gmail account creation using iMacros. Facing problem in selecting Gender and Month.

Tried StackOverFlowSolution but it is not working for me. It reports that the command not found. Is it some version mismatch issue or am I missing something?

Can anybody help me in resolving this?

Pasted below the recording along with this fix for reference.

VERSION BUILD=8340723 RECORDER=CR
URL GOTO=https://accounts.google.com/SignUp?dsh=447577167596141020&continue=https%3A%2F%2Faccounts.google.com%2FManageAccount#FirstName=&LastName=
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:createaccount ATTR=ID:PasswdAgain CONTENT=asdf123
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:createaccount ATTR=ID:BirthDay CONTENT=15
TAG POS=1 TYPE=SPAN ATTR=ID:birthyear-placeholder
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:createaccount ATTR=ID:BirthYear CONTENT=1989
TAG POS=1 TYPE=INPUT:TEL FORM=ID:createaccount ATTR=ID:RecoveryPhoneNumber CONTENT=+919791151088
SET monthNum 7
SET monthSlc EVAL("var s = '{{monthNum}}'; switch ('{{monthNum}}') {case '10': s = 'a'; break; case '11': s = 'b'; break; case '12': s = 'c'; break;} '#\\\\:' + s + '>DIV';")
SET listSlc "#BirthMonth>DIV>DIV:nth-of-type(2)"
EVENT TYPE=MOUSEDOWN SELECTOR={{listSlc}} BUTTON=0
EVENT TYPE=MOUSEUP SELECTOR={{listSlc}} BUTTON=0
EVENT TYPE=MOUSEDOWN SELECTOR={{monthSlc}} BUTTON=0
EVENT TYPE=MOUSEUP SELECTOR={{monthSlc}} BUTTON=0


Solution

  • You could definitely do this with imacros. Just a small workaround for this.

    Below is the code

    TAG POS=1 TYPE=INPUT:HIDDEN ATTR=ID:HiddenBirthMonth CONTENT=05
    TAG POS=1 TYPE=INPUT:HIDDEN ATTR=ID:HiddenGender CONTENT=MALE
    

    You can change the above Hidden Input Field's value, and the Month and Gender will get updated (though it might not be visible for the user)

    Cheers!