Taking page cookies and fetching API data via POST

I am working with an API endpoint that requires to pass cookies created during log in. Is there a way to take cookies from the page and pass as variables into executeScript ?

Topis I’ve read:

Option 1:

  1. Open Chrome browser
  2. Open devtools
  3. Open page
  4. Login
  5. Extract xhr from devtools

Option 2:

  1. Open Chrome browser
  2. Open page
  3. Login
  4. Get cookie and pass into executeScript for POST call

I guess option1 is that you asked about here, or?

Another 3rd option might be: Do you know the location where the cookie file gets stored on the hard-drive?

If so you can write a little script (Powershell, node.js, phyton, …) to read the cookie content. Cookies are just text files. To read the text file, you can use csvRead or csvReadArray. Do not be confused that the command is called csvRead/csvReadArray. It can also used for normal text files/log files/cookie files, as a text file is nothing else than a csv file with only one column :wink:

sorry to say that ui vision is currently not allowed to call api by any method by the way you can use “Automa” to perfom best control on all these problem which you mention in ticket.

Hello @ali_raza - It seems that you are working for Automa? Welcome in our RPA forum :grinning:

I have never used Automa. But for Ui.Vision I know for sure that you can use the RPA software to call any API.

Did you actually try it with Ui.Vision? If you run into any issue, please post your API here, and tech support can generate the API call code for you.

I’m not working for Automa just work for browser automation in simple use cases.
you must visit once it because you’ll get lot of feature which i also expect in ui vision.

  1. scheduler
  2. pretify logs
  3. http request
  4. loop on elements
  5. host script
  6. trigger
  7. debug mode (i mean perform click or type in debug which will work if your element is not clickable or typable like
    ) [it’s most important because if you’ll use it you’ll never need to use xclick which is very slow as compare to it’s]

But I’m also appreciate to your ocr feature which i really useful.
I was working on ui vision but now switched i never i found it even i was getting “cors” error by this method . after of it i started Automa where is clear command for http request…
After all of these you should also put command by name of “httpRequest” which will be proper for it.

Thanks to put your response.

Do you have an example of this??? Please post a website link/demo page on which Automate can click a certain link, but the Ui.Vision CLICK command can not click it. That would be interesting to see!

On a different note, the Automa extension store page says: Automa may soon no longer be supported because it doesn’t follow best practices for Chrome extensions.

→ So it looks like Automate will be discontinued (no MV3 update)? This happened to the Selenium IDE Chrome extension, too. If that happens, good that you have Ui.Vision as Automa alternative. These days we get many users from Selenium IDE. They use Ui.Vision as Selenium IDE alternative.