Html exported json issue and random errors

Hello everyone

Don’t know if this is a bug or what i’m doing wrong

so i have this simple test to verify links, the thing is it seems to work ok when running on the extention through json file
But when gets exported as html seems to start to throw a bunch of errors

this is an example, the full json got several links to test, and seems that the test runs ok for a few steps and then starts to fail

note that this happens only when using html exported and not the json itself, it seems to run at a more much faster speed which seems to give a lot of troubles to commands to work ok.

{
“Command”: “open”,
“Target”: “URL EXAMPLE (www)”,
“Value”: “”
},
{
“Command”: “echo”,
“Target”: “----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------####TEST START------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------”,
“Value”: “orange”
},
{
“Command”: “pause”,
“Target”: “5000”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//*[@id="siteheader"]/div[1]/div[2]/div[1]/span[1]”,
“Value”: “”
},
{
“Command”: “clickAndWait”,
“Target”: “linkText=EXAMPLECLICKLINK”,
“Value”: “”
},
{
“Command”: “executeScript”,
“Target”: “return window.location.href”,
“Value”: “myURL”
},
{
“Command”: “if_v2”,
“Target”: “${myURL} !="//www.exampleclicklink.com"”,
“Value”: “”
},
{
“Command”: “echo”,
“Target”: “—###1 ERROR LINK "https://www.exampleclicklink.com" NOT WORKING”,
“Value”: “red”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”
},

the initial idea was to set a batch file to run through a windowtask scheduler to open chrome and the exported html json but it seems doing this will broke test speed and eventually random errors occurs like

macro failed
“could not establish connection. receiving end does not exist”

please if someone know what’s wrong here would be great.

To clarify, it seems command interval doesn’t work well with html, but it’s ok on json

During my test i have notice the command clickAndWait can give error

Try to change clickAndWait to click and add pause 30000 after usually this solve all errors.

i’ll give a trie to this

well
It seems doesn’t work and even it shows more errors than before

Absolutely random errors

  • [error]

Command click not supported yet

  • [info]

Macro failed (Runtime 23.62s)

Another thing is that constantly say that there’s a warning

  • [warning]

“Web page connection issue. Retrying last command.”

actually the web loads perfectly fine

although this warning doesn’t show up when running the json, everything seems to be attached to HTML export there’s some problem in this exported file.

The code of your macro is written in a confusing and error-filled way, rewrite it in an orderly manner and repeat it in the forum after we can help you. Remove all unnecessary parts (I see many of them) and leave only commands that perform a function avoiding unnecessary commands that slow down execution.

am sorry, but what’s wrong with the macro?
the macro works fine when runs the json but when runs exported html (autorun) there are some issues with command interval that make the macro got broken (somehow)

i’ll explain the code

first open an URL

then

first click opens a menu

next in that menu clicks on a link

then verify if the link URL is ok and have the correct address

if not the same then “echo” ERROR…etc

if any of this would be wrong it should not work in firstplace, but it runs ok except when running exported autorun HTML
thank you.

I use regulary exported code and working well, the only way of error is your macro code.

Try to rewrite your code in a better way

This is related on your internet connection “could not establish connection" and io vision can not nothing about this.

Best way to create macro is, use all condition to compare a status before, only is all condition are satisfied you open the link in this mode you bypass the “could not establish connection" problem.

Every code of macro can be reqrite in better way.

ok thanks!

But could you show me an example? i want just to verify URL match with the click objects

thank you again!

You can extract url with sourcesearch or storeattribute, after you compare, and after you open url.

Remember a short code of macro have more chances to success, create always macro short to bypass freeze or crash.

I have to the problem with “could not establish connection” error and seem random, sometimes firefox can not load an url and ui vision stop wo work in this case, i periodically close and reopen browser and restart macro to prevent these cases.

https://ui.vision/rpa/docs/selenium-ide/sourceextract-sourcesearch

https://ui.vision/rpa/docs/selenium-ide/storeattribute

well

I have found this

setting this at macro start will do the job of kipping the test speed

Command : Store
Target : SLOW
Value : !replayspeed

In my opinion when you have this error “Web page connection issue. Retrying last command.” you can not solve, this is caused from your internet connection.

You can try to add a long pause command but is not a definitive solution.