UI.Vision/Kantu as iMacros Alternative

Is anything new in this addon or only ported to webextension? (chameleon-ext vs random-agent-spoofer)

Port is not bad. Quote:

WebExtensions are unable to modify about:config entries. A workaround for this is to use the checklists that can be found under certain menu options. Right click the option and select Copy Link Location. Paste this link into your address bar and you’ll be presented with the option in about:config.

In this case is the Webextension not better but updated addon with newest api without new functions.

My big problem to use Waterfox are 2:

  1. I use more webextension that i combine with macros and if these extension are not available for Waterfox i can not work (some extension have no alternatives).

  2. Waterfox support only windows 7 with 64 bit, for me this is a big problem because i need to use browser at 32 bit for virtual box (not available at 64 bit).

random-agent-spoofer is now abandoned and is no longer updated so it is unusable today because it contains settings 2-3 years old, for this was born chanmeleon that every week is updated with the new settings of mobile browsers and I have not found any good alternative.

  1. Which extension is only under Firefox quantum available and was never legacy? (chameleon was a good begin and with your last edit I understand your problem but solvable)

  2. I have only 64-bit software but Chapter 3. Configuring Virtual Machines says it’s possible on your 32-bit system if you have a 64-bit processor. Only atom processors was 32-bit in the past but I’m unsure. This problem is very old and not longer mainstream.

  1. I use more extension and all working for firefox quantum, on mozilla site old addons for firefox 56 will be removed, i use only webextension.

The legacy version are old and not updated and can not install in firefox quantum.

I use firefox quantum from 1 years, i migrate from firefox 56 (or esr 52) for webextension because all addons legacy was removed and are incompatible with quantum.

  1. My virtual box have not any option to 64 bit, i have all the machines at 32 bit, it’s very hard delete all 32 bit machines e recreaet it at 64 bit with risk of incompatibility of software installed.

OS 64 bit and software 64 require more memory but my problem is format all 32 bit virtual machines and recreate all in 64 bit with new software at 64 bit.

  1. Yes, the Firefox developers made the choice, but not all in the Internet (e.g. Pale Moon addon page with bugfixes/changes if required). Same with the email client thunderbird in the next time.
    The second thing is the full webextension api is not finished but the legacy api is gone in Firefox quantum. Much addon developers are not happy. It take time.

  2. My systems are all 64-bit with enough ram and drive space. 32-bit was gone for me since years. I have already updated all virtual machines with portable edition if available.

At the moment I use firefox ESR 60.8.0 esr and I have not problem with kantu.

In the past i working with firefox 66 and sometimes give me some problem like multiple windows opened when I clicked a link or stuck pages for 1-2 seconds, but I solved all problem using ESR version and all addons updated latest version.

I continue to use imacros on firefox esr 52 for extraction because imacros have relative tag (best feature) and can easy perform extraction in the webpage.

Kantu have not relative tag and it’s very hard perform extraction with multiple values (xpath is not the same).

Imacros is more fast of kantu and usually do not stuck, Kantu with loop can stuck sometimes.

With Kantu it’s more simple to create loop dynamic and text manipulation (storeeval and executeScript), imacros need macro in javascript.

With Kantu i can run software, in new version there are a simple command to do this, now i simulated WINDOWS + R and load any software/text in my pc, I perform some update of csv and archives with batch file runned by kantu after end macro execution.

Kantu and Imacros are beautiful software i love it :slight_smile:

1 Like

StoreEval/executeScript is more than text manipulation in Kantu. I’m unsure but relative tag is with Javascript in Kantu thinkable.

In Kantu you can use incremental xpath but is not like relative tag of imacros.

Path incremental extract empy line too (already tested).

Relative tag can go both forward and backward and it’s very accurate it just extracts what you’ve indicate.

Here an example

/html/body/div[4]/div[1]/div[2]/div[2]/table/tbody/tr[${myrow}]/td[1]

${myrow} is the number to increment

I tried with extraction of ip address ina web page and xpath save empty line too or lines with banner elements because xpath (recognize del line only) is not a relative tag.

It’s very difficult with Kantu perform relative extraction with numerous items to extract.

With imacros I can extract 20k element too without any error (empty lines).

1 Like

XPath has both in my test. It’s not perfect but okay. Tested with storeText.

Example with showmemyip.com

xpath=//*[@class=“ipaddress”]

And with relative tag (e.g. span):

xpath=//span[1]/.[1]
First number is like iMacros with TAG POS=1

Example with Selenium IDE Commands 2024 - Overview and Tutorials with storeText

xpath=//td[2]/.[1]
Output: The string to be set to the next prompt pop-up

In the second step you can use attributes (e.g. class, id) or tr+td (tr=row, td=column):

xpath=//tr[2]/td[2]/.[1]
Output: A locator

With class and table headline:

xpath=//table[@class=“table table-bordered”][1]/thead[1]/tr[1]/th[2]/.[1]
Output: Target

With class and content

xpath=//table[@class=“table table-bordered”][1]/tbody[1]/tr[6]/td[2]/.[1]
Output: The expected string of the title (Exact matching).

Or without class and the first table:

xpath=//table[1]/tbody[1]/tr[6]/td[2]/.[1]
Output: The expected string of the title (Exact matching).

See XPath Syntax

Hi

I use an advance xpath grabber for firefox quantum that find more and more xpatch (sometimer 20 different), but xpath is not like relative tag.

Sometimes inside the site there are banner, script and xpatch do not jump it, relative extraction working with element, xpath with table line.

In more case xpath saved for me adsense or other banner inside the page, relative tag never give this result.

Xpath is very generic and work bad when inside the table there are space, banner and other element.

Relative tag working well.

Which xpath grabber addon? Link?

Live example with your table/banner/adsense/other-elements problem possible?
Then it’s easier to understand what’s going wrong in Kantu.

Hi tried this

With i macros i can extract unilimited proxy and extract only proxy.

With Kantu and xpath extract proxy and others element inside the table.

With i macros i perform macro to extract 20k or more elementi in numerous pages and with relative tag never i got error, with Kantu and xpath the extract is slow, sometimes freeze page and extract external element.

There is nothing similar relative tag of imacros, it’s work fast, without freeze and and very precisely.

Try with xpath to extract 20k (20000) element, probably it’s impossibile, i with imacros can this without any problem and very fast (few minutes).

I have no freezes, only few errors in your loops. Smaller !TIMEOUT_WAIT, newest commands in Kantu, js with try/catch and if line are helpful in this case.

{
  "Name": "get-proxylist",
  "CreationDate": "2019-9-19",
  "Commands": [
    {
      "Command": "open",
      "Target": "http://free-proxy.cz/en/proxylist/country/DE/all/ping/all",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "0.05",
      "Value": "!TIMEOUT_WAIT"
    },
    {
      "Command": "store",
      "Target": "FAST",
      "Value": "!REPLAYSPEED"
    },
    {
      "Command": "store",
      "Target": "true",
      "Value": "!ErrorIgnore"
    },
    {
      "Command": "store",
      "Target": "1",
      "Value": "i"
    },
    {
      "Command": "store",
      "Target": "1",
      "Value": "i2"
    },
    {
      "Command": "label",
      "Target": "loopbegin",
      "Value": "<<<<<<<<<<<<<"
    },
    {
      "Command": "executeScript",
      "Target": "try{return document.evaluate('//*[@id=\"proxy_list\"]/tbody/tr[${i}]/td[2]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerText}catch(e){};",
      "Value": "testdata"
    },
    {
      "Command": "if_v2",
      "Target": "/^\\d+$/.test(${testdata}) == true",
      "Value": ""
    },
    {
      "Command": "storeText",
      "Target": "xpath=//*[@id=\"proxy_list\"]/tbody/tr[${i}]/td[1]",
      "Value": "!csvLine"
    },
    {
      "Command": "storeText",
      "Target": "xpath=//*[@id=\"proxy_list\"]/tbody/tr[${i}]/td[2]",
      "Value": "!csvLine"
    },
    {
      "Command": "storeText",
      "Target": "xpath=//*[@id=\"proxy_list\"]/tbody/tr[${i}]/td[3]",
      "Value": "!csvLine"
    },
    {
      "Command": "storeText",
      "Target": "xpath=//*[@id=\"proxy_list\"]/tbody/tr[${i}]/td[4]",
      "Value": "!csvLine"
    },
    {
      "Command": "csvSave",
      "Target": "proxies",
      "Value": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return (parseInt(${i2})+1)",
      "Value": "i2"
    },
    {
      "Command": "end",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return (parseInt(${i})+1)",
      "Value": "i"
    },
    {
      "Command": "gotoIf_v2",
      "Target": "${i2} < 10",
      "Value": "loopbegin"
    }
  ]
}
1 Like

Hello congratulations for the macro code is much improved compared to the orginal one that stuck often. I noticed that you used codes that I don’t know could you explain to me?

This code how to work ?

    {
      "Command": "executeScript",
      "Target": "try{return document.evaluate('//*[@id=\"proxy_list\"]/tbody/tr[${i}]/td[2]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerText}catch(e){};",
      "Value": "testdata"
    },

This code how works ?

    {
      "Command": "if_v2",
      "Target": "/^\\d+$/.test(${testdata}) == true",
      "Value": ""
    },

Why use 2 different loop i and i2 ?

The original version of the macro often froze and did not work well the one you find at this link, the same author writes that it also stuck to him

You were very good at making this macro congratulations

  1. try/catch
  2. document.evaluate is required for xpath in Javascript
  3. In this case I try to grab the port number
  4. “if” with Javascript for “only numbers” (\d = 0-9) and if “true” then execute the lines
  5. “i” is the line in your table and “i2” is the result (e.g. not higher than 10 in the results, example i=11, i2=9)
    Short programming language knowledge in Javascript.

Is “often froze” for you only longer wait times (default max. 10 seconds per line) and you haven’t checked the log in your Kantu?

1 Like

hi @thecoder2012 Thanks for reply.