Sign in to follow this  
Followers 0
spooky101

IE Click Button without Name or ID

6 posts in this topic

Hello!

I seem to be having an issue trying to click a button. The whole goal is to login to the website listed below.

https://service.ariba.com/Supplier.aw/691728/aw?awh=r&awssk=XNwakvnQ&dard=1

For some reason, I'm unable to find a way to click the button as the button doesnt have a name or ID and I've been trying to to figure out how to use the TAG IE functions to my advantage, but to no avail. The button has a unique class name (i believe) "btnC".

Does anyone know a way to submit the login form?

Any help is appreciated.

Thanks!

Michael

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Forum Rules Edited by Melba23
Add link in place of text

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

Blue_Drache, you could have just linked the rules, or just quoted the part that was relevant.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

I guess I dont quite understand how this rule "Bypassing of security measures - log-in and security dialogs, CAPTCHAs, anti-bot agents, software activation, etc." when i'm using my login to the website. This isn't a bypass.. its a login. I'm clicking a button. I dont intend to give out my login to this website, nor do I intend to bypass its security measures with the use of AutoIT. I intend to use my login to download a spreadsheet daily. Feel free to ban me or whatever you would like, but I find it quite ridiculous if you truly believe that clicking a button on a website is considered bypassing their security measures.

Thanks!

Share this post


Link to post
Share on other sites

Login scripts were removed from the rules. I do not see this as bypassing any type of security ( other than a login, which isn't security if you have an actual username and password ).


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Welcome to the world of CSS. The Login button is not a button at all, but just a table cell (TD) with a CSS class that makes it appear as a button.

There could be more elegant ways to do this, but this should work:

$oTDs = _IETagnameGetCollection($oIE, "TD")
For $oTD in $oTDs
    If String(_IEPropertyGet($oTD, "innertext")) = "Login " Then
        _IEAction($oTD, "click")
        ExitLoop
    EndIf
Next

Dale

1 person likes this

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
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
Sign in to follow this  
Followers 0