Search code examples
imacros

iMacros Script Form Filing not working with Event or Content Method


I am trying to fill up a form for the URL https://kite.zerodha.com I tried filling up the form using xpath and event method, however both seems not to be working.

  TAG XPATH="//input[@type='text']" CONTENT=ABCDEF

The other known method is Event using keypress, however that also seems not be working

  EVENT TYPE=KEYPRESS XPATH="//input[@type='text'] CHAR="ABCDEF"

I also tried to tried to use button click to highlight the cell, however nothing happens. Was wondering that is there any other way to make it work.

  EVENT TYPE=MOUSEDOWN XPATH="//input[@type='text']" BUTTON=0

Solution

  • If you recorded the macro in Experimental event recording mode, you would get something like this:

    EVENT TYPE=CLICK SELECTOR="#container>DIV>DIV>DIV>FORM>DIV:nth-of-type(2)>INPUT" BUTTON=0
    EVENTS TYPE=KEYPRESS SELECTOR="#container>DIV>DIV>DIV>FORM>DIV:nth-of-type(2)>INPUT" CHARS="ABCDEF"