I am new to imacros so i am having a little problem.
I wanted to imacros perform next command based on what result i get from EVAL() in imacros. Like if EVAL() turns to true then visit a link else don't or click a button or not. Is there any way to do it.
For example i am using imacros on firefox.
The code i am running extracts a text from the page and compares it. If it turns to be true, i want it to press submit button else i want to perform all the tasks again
Thanks
Related
I created dynamic action in oracle apex i.e when selecting more than one check box it displays that "to select only one checkbox" if i click ok button of this message the checkboxes should be unchecked
After the confirm DA, add another DA with plsql code
:PXX_CHECKBOX_ITEM := null;
items to submit ->
:PXX_CHECKBOX_ITEM
What Valerio wrote would work, but I am guessing this is to do with the apex.item stuff you have been dealing with.
You will need to add another DA that is triggered by clicking the ok button. Then you need to have the DA run Javascript code. Since I saw you were asking about how to run javascript, in this case you need to go into the true actions of the dynamic action and set the Action to Execute Javascript code.(For other Javascript code you can click on Page XX: Name of page in the Rendering tab on the left, and if you scroll down on the right there should be a section for Javascript)
And the Javscript code you need to execute to uncheck should be $s or something similair. https://apex.oracle.com/pls/apex/germancommunities/apexcommunity/tipp/6341/index-en.html is a good starting point on just these basics.
I actually tend to avoid interactive reports, I prefer Interactive Grids. But you do you. If you do get into Interactive grids I recommend you go through this: https://github.com/mgoricki/orclapex-ig-cheat-sheet
I want to put text into the input on the page, but it doesn't belong to any valid form. How I can do it?
I tried:
TAG SELECTOR='<selector>' CONTENT='<content>'
and
EVENT TYPE=KEYPRESS SELECTOR="selector" KEYS=[keycodes]
But it doesn't seem to work
First of all,
CSS Selectors are only available in EVENT command with imacros add-on for firefox. But one need iMacros pro v11 to use CSS Selectors in TAG command.
So why cant you just do this
First, use imacros plugin in firefox for this, then go to Record -> Record Options -> Enable Experimental Event Recording Mode.
Then click record button and click the input box where you want to paste, the selector for the input tag will be recorded like so.
EVENT TYPE=MOUSEDOWN SELECTOR="html>body>div:nth-of-type(2)>div:nth-of-type(2)>input" BUTTON=0
Now what you actually need is only the selector address, this will be the path of the input tag where you want to place your text. So next you will paste the selector from the previous step into the below code.
SET !CLIPBOARD "text that is going to be placed in the input tag"
EVENT TYPE=KEYPRESS SELECTOR="html>body>div:nth-of-type(2)>div:nth-of-type(2)>input" CHAR="v" MODIFIERS="ctrl"
So lets check the above code on what is going on.
Line1: We set the clipboard variable of imacros to whatever text you want to insert.
Line2: Then the event tag is going to select the input tag will the selector that we manually inserted, Then we trigger a Ctrl + v through Imacros and the text is gonna get pasted.
I hope my explanation was clear and consise and hope it helped with your issue.
References:
How to select all copy and paste in imacros
How to extract text using CSS Selectors
imacros selector discussion
I know this might seem a lazy question, but I did not find a straight to the point answer yet.
When I type "submit form with imacros" on Google, nothing is clear to me.
And the official iMacros documentation talks about filling forms, but not about submitting them.
I saw that some examples use javascript:
URL GOTO=javascript:window.document.form.submit();
Other examples use CLICK with coordinates.
So, how do you submit forms with iMacros?
The most basic way to submit a form is via the submit button supplied at the page.
The easiest way to do so is to record clicking on it (FireFox iMacro addon -> Record tab -> Record , play with record options only if needed). The output will be saved under #Current.iim and will look like this:
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
URL GOTO=http://demo.imacros.net/Automate/TestForm1
TAG POS=1 TYPE=BUTTON FORM=ACTION:/Automate/FormSubmitConfirm ATTR=TXT:Click<SP>to<SP>order<SP>now
iMacro will use attributes like html type, form action and the text on the button to identify it against others. Once recorded you can start messing around with attributes if you have additional needs.
Solutions like CLICK or javascript have a tendency to almost never work (for me personally) and are used in more extreme cases where the buttons change names/ids/locations in an unpredictable way.
If you want to press enter to submit then you can do this this works in CHROME imacros for me ..
EVENT TYPE=KEYPRESS SELECTOR="#react-root>SECTION>MAIN>DIV>DIV>ARTICLE>DIV:nth-of-type(2)>SECTION:nth-of-type(3)>FORM>TEXTAREA" CHAR="\r"
I'd like to call imacros files from web pages to start automatically after button click or something. I have followed the imacros docs but i got confused.
Is there any method to do that?
thanks
I found a simple code did the job in new iMacros version.
imacros://run/?m=macrofile.iim
for example
Run macro
I am trying to Incorporate a javascript validation on an application in apex.
Basically, what should happen is that the validation should run if i click on a textfield or another Item type. I want to the validation to runs without me having to click on a submit or save button.
For an example if I was filling out a form, I want to validation straight after the user click from "FirstName" field to "LastName" and each individual field will have it own validation.
The reason why I want to do this is because I have an application which takes about 15-30 minutes to fill out and sometimes after you spend all those mins filling it out and click on save or create. you get a long list of validation errors. To avoid this I want to use javascript/Ajax to do a validation which validate individual fields straight after you click from one field to another.
I have a feeling it can be done but i dont know how. Please point me on the right direction.
EDITED
for an example I have this validations
begin
if length(:p1_subject) >3 then
return false;
else
return true;
end if;
end;
This validation will only run when i click on the create button but I want it to work everything you click off and on the p1_subject field.
Hope I am making sense.
Thank you very much.