LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2018, 07:53 PM   #1
enginestar
Member
 
Registered: May 2018
Posts: 67

Rep: Reputation: Disabled
Can I do this on Linux...


Step 1:
I have a form on a HTML page.
I want to copy all relevant fields and store in variables - available for use later.

Step 2:
In another browser window, use the fields copied and fill in another form.

Step 1: I could just analyse the HTML and get the data I suppose (this is the nest way). But is there a way I can start on field one, and simulate tabbing through each field? This is the way I am currently doing on Windows with the help of another program.

Step 2: in Windows, I use some code to simulate tabbing through the different fields and pasting in the variables stored. I'm assuming I can use Python - but don't have enough experience of this. Is there any other way?

Thanks.
 
Old 07-18-2018, 08:04 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,027

Rep: Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632Reputation: 3632
I'd say yes.

For the most part a HTML server provides what the author wants you to be able to have. Modern pages don't tend to be simple text. Without knowing more I couldn't guess what is the best way to grab that data and automate it.
 
Old 07-18-2018, 08:08 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,415
Blog Entries: 28

Rep: Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166
HTML is platform independent. If it works in Windows, it should work in Linux, etc.

If you are doing this on a web form and wonder whether you can do it on Linux, I must assume you are using some proprietary method. It might help persons answer your query to have more information about what methodology you are using now.
 
Old 07-18-2018, 08:36 PM   #4
enginestar
Member
 
Registered: May 2018
Posts: 67

Original Poster
Rep: Reputation: Disabled
thanks for the replies guys.
currently i use AHK (autohotkey) - this helps me simulate just about everything on windows - including mouse movements.
there's at least one other program called autoIT that does the same (never used that one though).

it's kind of cheating...
with basic programming and using current windows interfaces... you can automate any app where you do manual repetitive tasks.

where would i start for looking up how to simulate the user filling in a form?

using AHK, you can make it pretty advanced and actually submit the entire HTML form and give the server what it's expecting. (involves using COM object of internet explorer.)
i'm assuming there will be a clever way to do using linux scripting as well...
but even though this is a better solution... no good for me... i need to be able to glance and see manually that the correct fields have been copied. so i need the simulated way described.

let me know what you think.
thanks.
 
Old 07-19-2018, 12:49 AM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
IronAHK is a tool much like AHK. https://github.com/Paris/IronAHK
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration