Automated data extract and external text file logging

Asked by Rick G

Hello,

I'm working on a project where we are logging into a web application and want to use SikuliX to extract data, log it into a text file and then import it into a spreadsheet running as a scheduled task.

My questions are:
1. Would this task be best performed in the IDE? or is there another more efficient method?
2. What's the best way to extract data from a browser? screenshot? region?
3. How can I extract the data into a local log.txt file?
4. Can I use SikuliX to read the text file and copy/paste it to another location? For example, an excel spreadsheet
5. Ideally I would like the script to be automated so we can set it up as a scheduled task in Windows Server 2012. Is it possible to run the script using a batch file with command line arguments?

I know there are a lot of moving parts to this. Any help would be greatly appreciated.

Thank you for your time and attention.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

If it is a normal webpage (no Flash), then using Selenium is much more suitable than SikuliX, to extract content from the page.

If needed, you might mix both packages.

With SikuliX reading text from an image is possible but still rather weak. nevertheless you might give it a try.

your questions:
at 1. if Python is ok for you, then the IDE is ok for getting used to SikuliX and make the first steps. PyCharm or Eclipse/PyDev could later be used, if things get more complex. The resulting scripts should then be run from command line in regular production.

at 2. Region.text()

at 3: standard Python file I/O

at 4: principally possible, but should not be used in your case for bulk data transfer.

at 5: yes. With task scheduler the script has to run in admin context to be allowed to act on the screen.

Revision history for this message
Mike (maestro+++) said :
#2

To extract text, is it not safer to use CTRL-C /CTRL-V if you can (most web site text is clipboard accessible)?

Question to Rick: why do you want to extract the data into a log and then from there to a spreadsheet? Why not fill the spreadsheet in as you go?

Can you help with this problem?

Provide an answer of your own, or ask Rick G for more information if necessary.

To post a message you must log in.