iMacros Script Form Filing not working with Event or Content Method - imacros

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

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"

Related

How can I trigger an event when a user clicks a GtkFileChooser or GtkFileChooserButton in GTK+3.0?

I have a function that I'm using to grab properties of a widget when a user changes it's input for undo/redo functionality. I have entries connected such that when a user clicks on them (focus-in-event), the current text is taken and stored. However, I've been having a big problem trying to do this with a file chooser or file chooser button. For some reason, when I click the button or chooser, and I have my handler wired to the focus-in-event signal, the filename is not grabbed. I'm not sure how to grab this value before the user changes it. I'm using glade to attach handlers to signals. Thanks!
You can achieve this by calling the get_filename method within a selection-changed callback. The response signal runs when the ok, or cancel button is clicked, and can be used to set or update which file/folder is selected to perform actions on.

Imacros click selector

I'm a beginner in imacros.
FRAME F=1
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(3)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>DIV:nth-of-type(3)>DIV:nth-of-type(5)>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(3)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(3)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>DIV:nth-of-type(3)>DIV:nth-of-type(6)>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(3)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>DIV:nth-of-type(3)>DIV:nth-of-type(3)>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(3)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>DIV:nth-of-type(3)>DIV:nth-of-type(4)>SPAN" BUTTON=0
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(3)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>DIV:nth-of-type(3)>DIV>SPAN" BUTTON=0
I have them all in 6 different saved macros with the frame f=1, is there a simpler way to make it click all of them from just 1 saved macros command instead of 6?, it be much easier if I can make it click with just one command ...like one command would work to click any of the 6 random ones? maybe I need to shorten one of them and it would work to click any of them?
and it's to make it click as fast as it goes so putting all 6 click commands into one will run but it'll click slower do to clicking the right one all the time, just wondering if i can put just one command would make it click regardless which 6 command it is.
Try this macro having only one line:
URL GOTO=javascript:{for(i=1;i<=6;i++)window.frames[0].document.querySelector("HTML>BODY>DIV>DIV>DIV:nth-of-type(3)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>DIV:nth-of-type(3)>DIV:nth-of-type("+i+")>SPAN").click();}
('iMacros for Firefox' v.8.9.7)

Get data from Double click on non-editable Kendo Scheduler

I tried to get the data for empty kendo scheduler. Mean no event. I try to extract atleast start time, end time and date. I off the editable. mean I not use the window that kendo provided. I try to custom by using bootstrap modal.
here is my event delegate
$("#scheduler").delegate('.k-event', "click", function (e) {
debugger;
});;
I can get the event on this scheduler, but i cant extract data without event.
To get the underlying event object from event element you can get it's data-uid attribute and pass it to the occurrenceByUid method. Demo is available in the method description (check the link).

Text input fields in iMacros

I want to fill out a text field in an AJAX form.
The AJAX nature of the form prevents me from doing something like this...
TAG TYPE=INPUT:TEXT FORM=Listing ATTR=NAME:Name CONTENT={{!COL1}}
Instead, in order to position the cursor in the field itself, I am needing to do something like the following...
CLICK X=411 Y=434
Also, I'm using the Firefox version so Direct Screen doesn't work because DS is only supported in Explorer. For example,
DS CMD=CLICK X=411 Y=434
doesn't work. If it did, then I would try something like:
DS CMD=CLICK X=411 Y=434 CONTENT={{!COL1}}
But, as mentioned, DS doesn't work in Firefox.
I need to emulate the action of actually typing the keys on the keyboard.
So how would I do this and actually insert data into the field?
I solved this (and an associated dialog handler issue) by using the EVENT recording mode.
Procedure:
Open #Current.iim
Rec
Record options
Experimental event recording mode (select this radio button option from popup/dialog menu)
The resulting code was as follows:
#Current.iim
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
URL GOTO=https://console.developers.google.com/project
EVENT TYPE=CLICK SELECTOR="#projects-create" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="#p6n-project-name-text" CHARS="My Project"
EVENT TYPE=CLICK SELECTOR="#p6n-project-creation-dialog-ok-button>BUTTON" BUTTON=0

Global event listeners in wxPython

I have a wx.html2 widget in my panel. Sadly wx.html2 doesn't have many event listeners (http://wxpython.org/Phoenix/docs/html/html2.WebView.html#events-events-emitted-by-this-class).
Now I have this binding to my panel (self is the panel);
self.Bind(wx.EVT_KEY_DOWN, self.OnRightClick)
.. and it works when I type in a blanco panel/frame as intended.
I wonder if there is a way to add more event listeners to the wx.html2 manually or make a global event listener that listens, no matter the sub-widget the event happens in.
This does not work either (self.wv is the wx.html object);
self.wv.Bind(wx.EVT_KEY_DOWN, self.OnRightClick)
Update
I'm fixing the catching of keys/mouse-actions with JavaScript inside my HTML page now. It works, but I would like it more that actions can be bound to the wx.html2 object.
There are only a few events emitted by WebView, all of which can be found in WebView - wxPython (Phoenix) 2.9.5.80 documentation.