First of all i would like to thank everyone in advance for your help if you could provide me some advise.
I am working on a script to automate a process of interest registration on a certain webpage
I have been working on a basic script that is already working and does the below:
1) clicks on a "load results button"
(a result appears and then proceed to step 2)
2) clicks on the "submit interest button"
3) repeats
Most of the time there are no results found after step 1 and In this script i have SET !ERRORIGNORE YES, thus even if no results are displayed and the "enter interest button" does not appear, the script will still run and repeat.
Once a result is found upon step 1, the script will successfully run step 2 and tag the "submit interest button"
which submits my interest to register for this particular event to the website.
But now i would like to enhance my script for a more specific selection.
I would like the script to be able to identify multiple keyword/text that might or might not appear in the results, example "blue" "purple" "orange" "red"
some results may appear only with the keywords "orange"
or another result may appear only "blue" or "red" etc
or another result may appear with both the words "blue" and "red"
(not necessarily the keywords will all appear at the same time in 1 result displayed)
OR a result may appear but DOES NOT contain any of the keywords above named.
This is what i need it to do:
If EITHER of the keywords/text are found in the displayed results then click on the "submit interest button"
If a result is displayed but none of the keywords are found, DO NOT CLICK the "submit interest button" and continue to run script and repeat to load for more results.
it is important that the script does not click on the "submit interest button" unless the keywords are found which is the main purpose of the script identifying they keywords/text.
I have read that i can use SET !VAR1 EVAL method to achieve the above but i am not very good at program coding
thus i really need some of your expertise here to help me with this.
I am currently using the free Chrome version of Imacros
Please help with the below coding on how i can achieve the above mentioned outcome.
Here is the code which i currently have working but without the keyword/text recognition mentioned above:
Code: Select all
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
URL GOTO=https://www.exampletesting.com
SET !ENCRYPTION NO
'This section below will login my account on the website automatically'
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login ATTR=ID:login:password CONTENT=mypassword
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:login ATTR=NAME:login:id1
'here, it clicks a "load results button
TAG POS=1 TYPE=IMG ATTR=SRC:https://loadresultsbutton.png
WAIT SECONDS=0.2
'here, it clicks on the "submit interest button' and then 'yes button' and finally a 'confirm button'
TAG POS=1 TYPE=IMG ATTR=SRC:https://submitinterest.png
TAG POS=1 TYPE=IMG ATTR=SRC:https://yes.png CONTENT=EVENT:MOUSEOVER
TAG POS=1 TYPE=IMG ATTR=SRC:https://confirm.png
WAIT SECONDS=0.3