Search code examples
imacros

imacros select from popup dropdown


Could you please help me :)

I have a TEXTBOX field which filling from a dropdown popup list.

enter image description here

It's not a drop-down list where I could use TYPE=SELECT

It doesn't take it as just a text, it needs to be picking from the list.

If I record a macro, it gives me:

   TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:management_main    ATTR=ID:order_release/attribute1 CONTENT=201500
   TAG POS=2 TYPE=TR ATTR=TXT:201500

If I record a macro in Experimental event recording mode:

EVENT TYPE=CLICK SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(3)>DIV>TABLE>TBODY>TR:nth-of-type(6)>TD:nth-of-type(3)>DIV>TABLE>TBODY>TR>TD>INPUT" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(3)>DIV>TABLE>TBODY>TR:nth-of-type(6)>TD:nth-of-type(3)>DIV>TABLE>TBODY>TR>TD>INPUT" CHARS="201500"
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(3)>DIV>TABLE>TBODY>TR:nth-of-type(6)>TD:nth-of-type(3)>DIV>TABLE>TBODY>TR>TD>INPUT" KEY=13
EVENT TYPE=CLICK SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(4)>DIV>DIV>TABLE>TBODY>TR>TD>DIV>DIV>TABLE>TBODY>TR>TD" BUTTON=0

I've tried:

EVENT TYPE=CLICK SELECTOR="#order_release/attribute1" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="#order_release/attribute1" CHARS="201500"

it doesn't work also...

Inspection of elements: enter image description here

So still can't catch this event to fill that field... Have you any idea for me? I would be veeeeeery thankful)

Thank you in advance!


Solution

  • I have found a solution and it works:

    TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:management_main ATTR=NAME:order_release/attribute1 CONTENT={{!COL7}}
    TAG POS=1 TYPE=INPUT:HIDDEN FORM=NAME:management_main ATTR=ID:order_release/attribute1@ID CONTENT={{!COL7}}