8 Replies - 188 Views - Last Post: 03 December 2019 - 12:34 PM

#1 atraub   User is offline

  • Pythoneer
  • member icon

Reputation: 835
  • View blog
  • Posts: 2,267
  • Joined: 23-December 08

Automatically open a page, fill in form fields, click button, repeat

Posted 03 December 2019 - 10:08 AM

Hey all, at my job, I use a CRM to track certain data (vague enough?), but sometimes I need to take info from the CRM and use it to fill out a form on a totally different website. I frequently use Tamper Monkey to inject Javascript into both sites to make my life easier and more efficient. However, I'd like to take this automation to the next level. Here's what I'd like to do...

Inject a button into website A that when pressed will open Website B, log in to website B, fill in a few form fields using data from site A and press a button, repeat the previous step a few times as I'll have several pages to go through.

I'm not looking for anyone to tie my shoes for me, just curious if any of you have done anything like this before and what sort of technologies I should be looking into.

Thanks!

EDIT: I know Python rocks for automation, but I'd ideally like to kick this off with a button, so I'm hoping I can do this mostly with Javascript.

This post has been edited by atraub: 03 December 2019 - 10:10 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Automatically open a page, fill in form fields, click button, repeat

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15433
  • View blog
  • Posts: 61,843
  • Joined: 12-June 08

Re: Automatically open a page, fill in form fields, click button, repeat

Posted 03 December 2019 - 10:15 AM

Something like Selenium or building an API in site 2?
Was This Post Helpful? 1
  • +
  • -

#3 atraub   User is offline

  • Pythoneer
  • member icon

Reputation: 835
  • View blog
  • Posts: 2,267
  • Joined: 23-December 08

Re: Automatically open a page, fill in form fields, click button, repeat

Posted 03 December 2019 - 10:16 AM

Unfortunately, these are tools that I do not have access to the source code. I thought about Selenium, but I don't know anything about it so I wasn't sure if that was a good path to explore.
Was This Post Helpful? 0
  • +
  • -

#4 astonecipher   User is offline

  • Senior Systems Engineer
  • member icon

Reputation: 3040
  • View blog
  • Posts: 11,683
  • Joined: 03-December 12

Re: Automatically open a page, fill in form fields, click button, repeat

Posted 03 December 2019 - 10:18 AM

I'd second Selenium for this.
Was This Post Helpful? 1
  • +
  • -

#5 atraub   User is offline

  • Pythoneer
  • member icon

Reputation: 835
  • View blog
  • Posts: 2,267
  • Joined: 23-December 08

Re: Automatically open a page, fill in form fields, click button, repeat

Posted 03 December 2019 - 11:39 AM

My Solution:

Page 1 I'll be adding a button that will open the new page with a dynamically generated query string. -> Page 2: I have a script that can look at that query string and automatically login if I provided a specific field. -> Upon logging in, there's no way for me to keep that info, so I'll be relying on local storage to save all the relevant query string data from page 1 -> profit!
Was This Post Helpful? 0
  • +
  • -

#6 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2465
  • View blog
  • Posts: 7,499
  • Joined: 15-January 14

Re: Automatically open a page, fill in form fields, click button, repeat

Posted 03 December 2019 - 11:47 AM

Hopefully you're not putting username and password information in every log between you and the server.
Was This Post Helpful? 0
  • +
  • -

#7 atraub   User is offline

  • Pythoneer
  • member icon

Reputation: 835
  • View blog
  • Posts: 2,267
  • Joined: 23-December 08

Re: Automatically open a page, fill in form fields, click button, repeat

Posted 03 December 2019 - 11:49 AM

View PostArtificialSoldier, on 03 December 2019 - 01:47 PM, said:

Hopefully you're not putting username and password information in every log between you and the server.


I'll likely store the credentials in an encrypted local file. It's not exactly ideal, but I'm not dealing with launch codes over here.

From the perspective of their website, it'll look like a normal login.

This post has been edited by atraub: 03 December 2019 - 11:50 AM

Was This Post Helpful? 0
  • +
  • -

#8 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2465
  • View blog
  • Posts: 7,499
  • Joined: 15-January 14

Re: Automatically open a page, fill in form fields, click button, repeat

Posted 03 December 2019 - 12:27 PM

The URL is part of the logs, but if you're using SSL then at least everything except the host will be part of the encrypted payload.
Was This Post Helpful? 0
  • +
  • -

#9 atraub   User is offline

  • Pythoneer
  • member icon

Reputation: 835
  • View blog
  • Posts: 2,267
  • Joined: 23-December 08

Re: Automatically open a page, fill in form fields, click button, repeat

Posted 03 December 2019 - 12:34 PM

View PostArtificialSoldier, on 03 December 2019 - 02:27 PM, said:

The URL is part of the logs, but if you're using SSL then at least everything except the host will be part of the encrypted payload.

If you're asking if I'm putting my credentials into a get request, or simply including them in the url, then no - there's no shortage of reasons why that'd be a bad idea.

This post has been edited by atraub: 05 December 2019 - 08:15 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1