Jump to content

Get input classname not working? click


Recommended Posts

Hi,

 

I am kind of new here.

there is a website i like to automate, the browser remenbers the login but i like to have a auto click.

i was searching for a while now to get this problem done, but nothing..

 

is there somebody who can help me?

 

I have here the script:

#include <IE.au3>


Global $oIE = _IECreate ("https://vrgroningen.ag5.com/")

$oFound = ""
Local $oInputs  = _IETagNameGetCollection($oIE, "input")
For $oInput  In $oInputs
    If String($oInput.classname) = "wt-button login-button cta cta-primary wt-enabled wt-imageless" Then
     $oFound = $oInputs
   EndIf
Next
If IsObj($oFound) Then
 _IEAction ($oFound, "click")
 MsgBox(16, "Success", "Password23 with a captial P (Roles have been set)")
Else
 MsgBox(16, "Failed", "Not found.")
EndIf

 

Also the webcode:

<li class="wt-panel-item wt-align-none login-button-outer" style="width: 100%;">

<input class="wt-button login-button cta cta-primary wt-enabled wt-imageless" type="submit" value="Inloggen">

</li>

 

complete webcode attached.

 

 

website.txt

Link to comment
Share on other sites

Welcome to AutoIt and the forum!

You need to do some error checking after each _IE* function call. Something like this:

Local $oInputs  = _IETagNameGetCollection($oIE, "input")
If @error Then Exit MsgBox(0, "Error", "Error searching for input elements! @error = " & @error & ", @extended = " & @extended)

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...