Sign in to follow this  
Followers 0
Wolfiesaxah

Clicking page elements by element ID

14 posts in this topic

Hi guys, I need to automate AutoIt so it clicks the image that is on a website. I don't want to use mouseclick using coordinates of that image as the image moves depending on page content. I need Autoit to search for these objects and click them so it's kind of a challenge for me.

As you can see, the "Submit an offer" button is an image. It does not have tab index but my theory is if I instruct Autoit to click the <TD> ID "ct100_Td1" it could sort of click the "Submit an offer" image since that image is inside the "ct100_Td1" <td>. Any ideas how or what code to use for this? I am currently using send keys sending tabs until I get a focus on an object but this one doesn't have a tab index.

'>

 

Share this post


Link to post
Share on other sites



Oops sorry I should have mentioned it is Firefox. The company is officially using FF so I can't substitute IE. Also, how do I get those files you include? I can see everyone been using #include here but I have no idea where those included files or scripts would be coming from, I'm new to AI. What do I do to get those scripts and when I get them, what code should I be referring to for the problem stated above?:)

Share this post


Link to post
Share on other sites

Look in the Example Scripts section. There's a UDF for FF that utilizes the MozRepl add-in.

Share this post


Link to post
Share on other sites

I tried searching but only found Chrome UDF. What would be the title Dan? Also, is that UDF a custom add-in made by another auto-it user? If so that means when I have questions or things I need help with in using the UDF it will be hard searching for help if only a few knows and been using it? Is there like an official UDF for Firefox that AI users have been using for a while now?

Too bad I was already excited seeing Valuater's sample code. I still have my fingers crossed that there's a solution for this problem. The website we are working on really made it hard for us by not using ordinary buttons and controls

Share this post


Link to post
Share on other sites

I dont know what official has to do with anything. This is a forum of Autoit users who like to donate their efforts to help others. '?do=embed' frameborder='0' data-embedContent>> is the unofficial firefox udf that's been used since 2009. I see it used and referenced a lot in the forum.


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

What he said. :thumbsup:

Share this post


Link to post
Share on other sites

Ah gotcha, sorry it's my first time here.:D I am still learning AI and so if I run into confusing stuffs with FF UDF I need to be able to browse the internet and find solution. But you said it's been used since 2009 so most of the confusions or problems probably already exists, thanks so much.

Share this post


Link to post
Share on other sites

I gave up on this, I was planning to use Autoit on FF for all employees at work but I can't have each of them go through the process of installing MozRepl and starting it and doing Telnet etch. I did all that and tried running the sample code of FF Click from http://english.documentation.ff-au3.thorsten-willert.de/ff_functions/_FFClick.php and all it gives are errors. I think I'll just stick to sending keys with AI.

Share this post


Link to post
Share on other sites

I found salvation. Rather than following what the company uses as default browser, I will just have them use IE when using this auto-it. Valuater's IE solution works without complication. I am not sure why FF.au3 requires series of Telnet and other complicated steps while IE only requires to be included in a script. I don't even have to download IE.au3 since it's already included in the installation of AI. My script is working now.

Share this post


Link to post
Share on other sites

While FF.au3 does require the MozRepl add-in, you shouldn't need to use Telnet or any other external apps. You can also set MozRepl to autostart.

Another possible solution that would allow you to continue to use FF without the add-in is >IUIAutomation.

Share this post


Link to post
Share on other sites

Thanks Dan, I will try to learn this IUI but I have to finish with IE for now so I can have something to present come Monday.:)

Share this post


Link to post
Share on other sites

Now that you mention it, that sound awesome! Ok I will try that

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