topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday December 3, 2024, 11:38 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Wait for a web page is fully loaded and then enter a password  (Read 6029 times)

Dan67

  • Participant
  • Joined in 2018
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
I would like to wait until a web page is fully loaded and then enter a password in a form field that appears on this page, but I do not know the commands to do so. May be "wait", but the loading time of the page may vary. Thank you in advance for your advice.
Dan

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,629
    • View Profile
    • Donate to Member
Re: Wait for a web page is fully loaded and then enter a password
« Reply #1 on: December 08, 2018, 04:29 AM »
Can't your browser' password manager fill that in for you? With Firefox, or a derivate, you get that option for free...

Dan67

  • Participant
  • Joined in 2018
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: Wait for a web page is fully loaded and then enter a password
« Reply #2 on: December 09, 2018, 04:17 AM »
I actually use this feature of Firefox, but for this site that is secure, it does not work.

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,939
    • View Profile
    • Donate to Member
Re: Wait for a web page is fully loaded and then enter a password
« Reply #3 on: December 09, 2018, 06:34 AM »
Sounds like certain elements of that website need to be loaded completely, before you can log in.

If you have an option to dynamically add code to a page, you could perhaps create a trigger that acts when those elements are completely loaded.

First you will need to find out what those elements are, then there is the problem of adding support for dynamically adding code/trigger to a page and then of course create code for the trigger. Doesn't sound like an quick and easy fix. Especially with so little background information.

Perhaps an add-on like 'GreaseMonkey' could help with the dynamically adding the code/trigger to the website in question.

This link might prove useful for the trigger: https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onload
« Last Edit: December 09, 2018, 06:42 AM by Shades »

Dan67

  • Participant
  • Joined in 2018
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: Wait for a web page is fully loaded and then enter a password
« Reply #4 on: December 09, 2018, 03:14 PM »
Thank you very much for this information, I will look at all this.
Regards

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: Wait for a web page is fully loaded and then enter a password
« Reply #5 on: December 09, 2018, 03:55 PM »
Dan67, you've posted this question in the Find And Run Robot forum section so I assume you want to do this using that program.

You can create an alias with multiple commands that first loads a website in the default browser, then waits a little and then sends keyboard input to the window that was active before FARR was opened. Here is sample code for the results editbox for the alias.

website login | https:://www.google.com ;;; sleep 1000 ;;; sendkeys user name here{TAB}password here{ENTER}

Note that this simple example assumes several things:

1. That the form field you want to input text to automatically has focus when the webpage is loaded. If not then you need to first send {TAB} commands until the form field has focus. On some websites even that might not work and then you'd have to find some other solution.

2. That the webpage is designed in such a way that you can also send {TAB} to navigate from the username field to the password field. Might not always be the case.

3. That you're ok with saving the login credentials in plaintext in a FARR alias. May not be a good idea in some cases, depending on who else has access to the computer, how important the account is and so on. There are various password manager tools that either come with a browser plugin or work as external tools. I suggest you first check if one of them can do what you want.

4. That you can reliably predict how long time the website takes to load each time. 1 second in my example may be too short, at least sometimes.

5. The example method might also be unreliable in a risky way since FARR does not verify that the webpage it is sending the credentials to is really the one that you intended. For example imagine that you during the 1 second (or however long you set it) wait period by mistake switch tab in the browser. FARR won't know that and will send the username and password to whatever website in the new active tab. That could end badly if for example that tab was a live chat.
« Last Edit: December 09, 2018, 04:04 PM by Nod5 »

Dan67

  • Participant
  • Joined in 2018
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: Wait for a web page is fully loaded and then enter a password
« Reply #6 on: December 10, 2018, 03:29 PM »
Thank you very much for this information, I think it is actually on this side that I can use FARR. I did not find any examples in FARR's help about this.
Thanks a lot for your help
Dan

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: Wait for a web page is fully loaded and then enter a password
« Reply #7 on: December 11, 2018, 02:32 AM »
Happy to help. If you want to read more about the sendkeys command and the syntax for special characters like {TAB} check this FARR help page: https://www.donation...ulate_keypresses.htm