Sign in to follow this  
Followers 0
SorryButImaNewbie

How would you click on to that img/button/link?

8 posts in this topic

Hello!

I try to automate a webpage for my company. I have almost everything in order, bit I miss the first step! I can't find/reach the the first control ID I want to use (after login)

I already tried posting to this forum, but I belive I may wrote it in a not to understandable way. Since AutoIt forum always helps when they can, most of the time the problems root is that the OP hasn't specified his problem well enough.

So the question is:

how do you click on this web page: webpage

I want to click (after entering with my user, I already have that part) on the table to the button on the section of Heti (10 napos) and D1. (but couldn't really handle anyother control from that grp) Their only deifference i could find is the link they lead you to, but that doesn't seems to be enough for me.

Right know I use a MouseClick on specific coordinate, but that isn't really ideal, also could go wrong if there is a long message at the top of the page, causing the script to click on something else or nothing at all.

Does someone has any idea/solution?

Share this post


Link to post
Share on other sites



Hi!

From what I understood, you could try the following methods:

  • Use keyboard inputs to navigate to the button and then press it, but this could also go wrong because of the message (I counted 14 Tabs and then Enter)
  • Crop out the Image of the Button and use >ImageSearch. This method has to be fine tuned with tolerance etc., but looks promising. (maybe crop out the Ft number too)
  • Use the mouse like you already do, but when you go to the coordinations, check if the hovered pixel is a specific color or a icon (symbolized a hand mouse icon instead of a n arrow)
    • If its not a hand -> use other coordinates

Share this post


Link to post
Share on other sites

Thank you draien!

I tried the tab version and its highly unreliable unfourtunetly :( (thanks to the message i guess, but not sure)

any mouseclick solution may have a problem, because I'm gonna stres test the site I'm going to run around 10 processes/PC. I never done that before, but I dont think that I can use the mouse in 10 process simulteniusly, or even if i could it stinks from possible errors.

Thank you for the ideas perspective, ImageSearch havent occured to me.

Share this post


Link to post
Share on other sites

any mouseclick solution may have a problem, because I'm gonna stres test the site I'm going to run around 10 processes/PC.

 

Wait... you wanna click a button without clicking it o.O?

Either way, glad to have helped

Share this post


Link to post
Share on other sites

without using the mouse with like _IEAction($variable, "click") or something like that

Share this post


Link to post
Share on other sites

Maybe if i use a simple tab in an if loop until it stands on the link said button is going to lead us. Then it its enter. Is this even possible, or not? and if it is what functions should one use to achive it? 

Share this post


Link to post
Share on other sites

Of course that's possible. But what exactly are you trying to achieve? Stress test? There are many services online for stress testing (loadimpact, etc.).

Are you the owner of this site? Getting kinda curious here...

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Well, yes, I like how I'm always reminded, that IT works according to your orders not by your wishes.... Your tab solution works (I tried something similar first , but discarded it after a few try) I simply added an _IELoadWait , since I had to click on that link after i logged in the website, of course it lead me to xy place when the page wasnt fully loaded....

On your  other question (on what mi trying to achieve)

Of course that's possible. But what exactly are you trying to achieve? Stress test? There are many services online for stress testing (loadimpact, etc.).

Are you the owner of this site? Getting kinda curious here...

 

I'm just an intern in a company, and my boss asked me to develop a script for stress testing this webpage. We (my company) are the national motorway something. We are entruested with monitoring the traffic on the motorways, and other streets outside the cities. In the webpage I linked people (or companies) can buy tickets, but the webpage is mainteined by an other company, so we are the owners, but it isn't running on our server, and i dont even know who developed it. So we can't use such a stress test site like the one you mentioned, since the webpage isn't ours, we would have to build in an API, which we can't.

So the reason behind this basicly is as follows: The site is crushing down left and right,the supplier says that it isnt, people complaining to us, we want to test how much users can the page handle exactly, I have no right to go in to what kind of agreements and how were implemented between these companies (I dont really understand them neither :) , but im sure they arent very effective)

Edited by SorryButImaNewbie

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