"Open" function logs out of site using some computers

I am a teacher working on a macro that will automatically click a button (for student attendance) on a list of webpages that are read from a .csv. The webpage is BehaviorFlip which requires a login.

If I am logged in one tab of BehaviorFlip on chrome and in a new tab paste the link to the page manually, it goes directly to the page I need. If I use UI.Vision and the “open” function it logs me out of the site.

What’s especially odd is that this only happens on some machines - for example the UI.Vision code works on my Mac running Big Sur, Mac running High Sierra, and one Chromebook running v86.0.4240.199 but NOT a different Chromebook running the same version. Is there some setting or security that would be logging me out when opening in a new tab and using the “open” function?

Here is a 16 second screencast showing it working.

Here is a 13 second screencast showing it not working.

The open command simply loads the website, I never saw it doing a logout. Could it be that the user was logged out by the page itself due to a timeout? And that he only noticed it once UI Vision tries to re-load the page? For example, my online bank logs me out after 10 minutes of inactivity.

Workaround: You can add a check to your macro. If the user is logged out, then automatically log him in again. I have such code in many of my personal macros.

I can confirm the user was logged in. We were able to manually paste the weblink in a new tab and have it work.

Re: adding a check to the macro - yes, I tried this, unfortunately after logging in upon going to the specific site it opens the “logged out” page again.

Any other ideas?

This is really strange… For the manual test, do you use exactly the same link (same URL parameters etc)?

Another test: What if you disable (comment out) the OPEN command, and the user manually opens the page, and then runs the macro, does it work then?

You could also try a different browser e. g. Firefox.

Here’s a video that shows typing the link works but running it in UI.Vision logs out.

Hi, I watched the videos. That is really mysterious - especially since it happens only on some machines :roll_eyes:

As a test: Instead of using OPEN you can use

executeScript | return window.location.href = 'https://ui.vision';

to navigate to a URL. Does this work better?

Test macro:

  "Name": "gotourl",
  "CreationDate": "2021-4-7",
  "Commands": [
      "Command": "executeScript",
      "Target": "return window.location.href = 'https://ui.vision';",
      "Value": "var1"
      "Command": "clickAndWait",
      "Target": "linkText=Visual Desktop Automation",
      "Value": ""

Thank you so much for your continued help. I think I’m not understanding the code. When I attempt to run the sample code I get an error on Line 1: “Error #101: UI.Vision RPA is not connected to a browser tab.”

I’m running this on a computer that works with my previous macro, so maybe I’m missing something?

I found the issue: By design OPEN works even if there is a “non-web page” such as the start page open in the browser because it loads a website by itself. But the executeScript command needs an already open web page to work since technically this command runs inside the website.

So there are two solutions:

  • Make sure a web page is open (< = that is what I recommend for this test)

  • Or add another OPEN command on top, e. g. OPEN | https://ui.vision

See here:

I’ve been able to test this on one of the computers that experiences the log out, and it works! Planning to test on another Monday. Thank you SO much for helping with this! So grateful for this community.

1 Like