Export Cookies

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
mknoll1
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Export Cookies

Post by mknoll1 » Fri Jan 12, 2007 8:26 pm

I am using Iopus on a website that uses a secure cookie for authentication. WHat I mean by this is that if I have the cookie I am able to log in directly to the website. If I do not have the cookie I am prompted to answer one of several security questions. I have been unable to script these questions because Iopus does not seem to be able to read and react to the website to provide the correct answer. As long as I have the cookie the scripts I have seem to work. However, if I would like to have a back up for disaster recovery or delivery to a customer I have to maually export the cookies. I know that there is a clear command for clearing the cookies and cache. I do not see a back up command in the help documentation.

I envision that the command would be somethign like BACKUP {{FILENAME}} so that upon executing the command the cookies woudl be exported to the designated file name and path. On the flip side an IMPORT {{FILENAME}} command would also be useful for delivering scripts that depended on the existence of a certain cookie. The user could simply save the exported cookie file locally and it woudl import each time even if the cache had been cleared for other reasons.

Please let me knwo if this feature exists and I am just missing it or if it would be possible to add this to a future release.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Tue Jan 16, 2007 8:09 am

Hi,

As you have correctly concluded there are currently no such commands for backup and import. We shall take this under consideration for future development.

What kind of security questions is iMacros not able to handle? Are these CAPTCHAS?

Daniel Kerr
iOpus Support
mknoll1
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Post by mknoll1 » Tue Jan 16, 2007 2:21 pm

THe security questions themselves are not really the problem. THe problem is that the questions change each time through. On most of these websites I will have set up 3 security questions and I am asked for one of them each time thourhg. However, I do not know which one I will be asked ahead fo time. WHen I can answer all questions with the same answer then I am all set and I can script it no problem. However, on many sites the website checks to make sure that all answers are not identical. when the answers are not identical I must rely on the cookies being present to ensure that I am not prompted to answer a random question.

I am familiar with how to use the SET !ERROR CONTINUE command to ensure that lines continue to execute even if prior lines have failed and I use this often in these cases but I do not have a way to read from the screen and then react. I know I can extract the question and store it as the {{!EXTRACT}} value. WHat I can not do inside of the Iopus script is do a compare on that value and make a control flow decision. If I could do that then this cookie export would be unnecessary but I think this would be a bigger redesign than addign cookie back up.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Wed Jan 17, 2007 8:33 am

Hi,

It is possible with iMacros to evaluate extracted data. To do this you will need the scripting edition, which will enable you to utilise the functionality of your preferred programming / scripting language. Please see of FAQs for more on this design decision:

http://www.iopus.com/imacros/help/faq_c ... ements.htm

Daniel Kerr
iOpus Support
mknoll1
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Post by mknoll1 » Wed Jan 17, 2007 9:14 pm

We have the scripting engine and have already built a Java program to launch the macro player. HOwever, when we wrote it a macro was generally a whole complete script from start to finish. We have to redo our player from scratch in order to work this in.
Mathias, iOpus

Post by Mathias, iOpus » Wed Jan 17, 2007 10:17 pm

While iMacros itself can not export/import cookies, you can easily backup the cookies yourself (using any programming or scripting language). The iMacros Browser uses the same cookies as Internet Explorer (IE), so you only need to backup the IE cookies. They are just simple text files.

If you have Windows XP or Windows 2000 then cookie folder is in this location (note that on your PC it can be on other drive instead of drive C):

C:\Documents and Settings\<username>\Cookies\

In these folders you can see all persistent cookies that are saved to your user account. The names of the cookie files are in form username@hostname. For example the cookie name administrator@altavista[2] is showing that this cookie came from http://www.altavista.com and the current computer user was administrator. You can also open the cookie file to see its content but it most cases it will be encoded and not human readable.
Mathias, iOpus

Post by Mathias, iOpus » Wed Jan 17, 2007 10:24 pm

Alternatively, you can also use the Import/Export Wizard that is included with Internet Explorer. Please see http://support.microsoft.com/kb/221523 for details. Among other things, this wizard can:

• Import exported Internet Explorer cookies from a Cookies.txt file.
• Export existing Internet Explorer cookies to a Cookies.txt file.

Cheers,
Mathias (iOpus)
iOpusUser1
Posts: 1
Joined: Sun Apr 08, 2012 8:01 pm

Re: Export Cookies

Post by iOpusUser1 » Sun Apr 08, 2012 8:13 pm

can anyone help me to make script for myimacros
that can export and import cookies
>I want to export cookies on site and save with filename {{!extract}}.txt
>then I can import these cookies at anytime with filename {{!extract}}.txt

Thank's for help
Post Reply