Jump to content
Sign in to follow this  
ait

Clicking a button on a webpage

Recommended Posts

ait

Hi I've only just started using AutoIt, I'm sure this has been asked before (I know it has I've searched but I can't get it working!) but how do I make my script click a button on an IE page?

My script opens an IE page this is part of the source code

</div>      
                         
                    <div id="lastContainer" class="formContainer">
                        <input type="submit" class="cssbtn" name="_updatePortableId" value="Update" />

Looking at some similar threads I tried this:

$oForm = _IEGetObjByName ($oIE, "_updatePortableId")
_IEAction ($oForm, "focus")
MouseClick("left")

I also tried it with send({ENTER}) but that didn't work either.

Share this post


Link to post
Share on other sites
Mercury049

Hi I've only just started using AutoIt, I'm sure this has been asked before (I know it has I've searched but I can't get it working!) but how do I make my script click a button on an IE page?

My script opens an IE page this is part of the source code

</div>      
                         
                    <div id="lastContainer" class="formContainer">
                        <input type="submit" class="cssbtn" name="_updatePortableId" value="Update" />

Looking at some similar threads I tried this:

$oForm = _IEGetObjByName ($oIE, "_updatePortableId")
_IEAction ($oForm, "focus")
MouseClick("left")

I also tried it with send({ENTER}) but that didn't work either.

If I could make a suggestion, and I'm not trying to be rude, please don't take it that way. Read heavily through the IE UDF library, read most, if not all of the functions help file, practice about with the functions and the built in example scripts. Then go back and try again. There's a lot more to it then the sample code you've listed above. In my opinion, working with the IE UDF is painful at times and also imho one of the more difficult UDFs, but I've build hugely robust scripts with it automating 3rd party security setups that work perfect. However, it took some time to make that happen. Read up some, then re-evaluate your question, then re-post.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.