Convert iMacros script into another free automation tool like Kantu or Selenium?

依然范特西╮ 提交于 2019-12-06 09:57:41

问题


I'm trying to create a script to perform mass actions on a personal account (context not relevant, I think). I figured a way to do it using this script for iMacros and it was working.

However, I needed to add a new variable to have a random delay between actions instead of having a fixed "WAIT SECONDS". Since I'm using the free version of iMacros, this doesn't work because it's using more than 3 variables :(

Now, problem is, I have no idea how to convert this script into another browser automation tool. Anyone can help me "translate it" to Kantu or Selenium, for example? Would it work? I'm aware that requesting opinion on tools is off-topic, but that's not my intention. I really don't care which program I use as long as it's free and it works. From what I've seen Kantu or Selenium are ok, but I don't understand how they work and I can't actually code (noob here) so I have no idea how to "translate" this to another platform. I need this for browser automation on Chrome (using a mac, if relevant).

Can anyone help me on this? Would really love to get this going but paying $99 for the premium version of iMacros is out of question as this is for personal use.

Thank you!

This is the script I have on iMacros:

SET !TIMEOUT_STEP 1
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO

SET !VAR1 {{!LOOP}}
ADD !VAR1 1

TAB T=1
TAG POS={{!VAR1}} TYPE=DIV ATTR=CLASS:-utLf EXTRACT=TXT
SET !VAR2 {{!EXTRACT}}

SET RANDOM EVAL("var randomNumber=Math.floor(Math.random()*85 + 95); randomNumber;")

SET !EXTRACT NULL

TAB OPEN
TAB T=2
URL GOTO=https://www.example.com/{{!VAR2}}
WAIT SECONDS={{RANDOM}}

TAG POS=1 TYPE=BUTTON ATTR=CLASS:BY3EC<SP><SP>_0mzm*
WAIT SECONDS=2

TAG POS=1 TYPE=BUTTON ATTR=CLASS:aOOlW<SP>-Cab_*

TAB CLOSE

回答1:


Your current Script can easily be converted to iMacros v10.0.x 'Free' for CR/FF using only 1 single Var, and you'll still have 2 Vars available...:

SET !TIMEOUT_STEP 1
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO

SET !VAR1 {{!LOOP}}
ADD !VAR1 1

TAB T=1
TAG POS={{!VAR1}} TYPE=DIV ATTR=CLASS:-utLf EXTRACT=TXT

SET !VAR1 EVAL("var randomNumber=Math.floor(Math.random()*85 + 95); randomNumber;")

TAB OPEN
TAB T=2
URL GOTO=https://www.example.com/{{!EXTRACT}}
WAIT SECONDS={{!VAR1}}

TAG POS=1 TYPE=BUTTON ATTR=CLASS:BY3EC<SP><SP>_0mzm*
WAIT SECONDS=2

TAG POS=1 TYPE=BUTTON ATTR=CLASS:aOOlW<SP>-Cab_*

TAB CLOSE

(And I've explained on the iMacros Forum how to use an "infinite" Nb of Vars with only 2 Vars..., trying to "lobby" against that Limitation that I find a bit useless and only nagging Users...)

Thread/Solution(s) referred to on the iMacros Forum:
- Re: 2018/2019 and the Future of iMacros...
=> ... Where Users with some Account on the iMacros Forum are "encouraged" to support "my Crusade" against the stupid in my Opinion 3x Var Limitation for the 'Free' Editions...



来源:https://stackoverflow.com/questions/55212324/convert-imacros-script-into-another-free-automation-tool-like-kantu-or-selenium

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!