Jump to content
Macro Express Forums

Suggestions To Find And Click The "submit" Button.


marcoval

Recommended Posts

Ok so I have a screnshot attached to this post with the picture of a button I want ME to find and click. It is within a JAVA based app and the Control finder doesn't recognize it. It is the submit button for a database query, so it will not appear on the same spot twice.

 

I thought of doing something like mapping the pixel colors for a certain area of it and have it loop through attempting to find "this pixel color followed by this pixel by this pixel by this pixel etc..." Hoping there is an easier way.

 

 

Thoughts?

post-2-1096490720_thumb.jpg

Link to comment
Share on other sites

Not really possible to post the URL, it's inside of a DB tool that we use internally, and is proprietary so... Bad things happen to Jeremy if He post urls. :) Also the reason I don't have a more complete screenshot. There is a demo reel out of it at

 

http://www.cobaltgroup.com/products/prospector.jsp#

 

That can give you some ideas on the UI.

 

As to tab order. I do use this quite a bit on other areas of the same product to automate it. However, the Tab order needs to just change by 1 between each screen to mess up that macro. While one screen might have 21 tabs to get to Submit, another might have 30 to get to submit.

 

I can try stuff out too should you have any suggestions? Also feel free to IM me if you would like me try out some stuff, my MSN Messenger info is on my profile.

Link to comment
Share on other sites

Actually now that I revisit Tabbing, I realize I didn't think out of the box. While it may almost never be in the same tab order, it is always the 2nd to the last in the tab order. So... Using this seems to work every time on random screens I've tested. Making use of the reverse tab order.

 

Shift Key Down

Repeat Start (Repeat 6 times)

Text Type: <TAB>

Repeat End

Shift Key Up

Text Type: <ENTER>

Link to comment
Share on other sites

Even if the reverse tab did not work you can use some ingenuity to find how many tabs there are. You just need one tab field that is identifiable.

 

Let's say the page opens with the cursor at a text box that says "Enter Data Here". If it's not standard you may have to copy into a Text Variable. Clear Clipboard. You tab through the page counting tabs as you go. At each, copy text to Clipboard. Examine text with If Variable. When the text equals "Enter Data Here" you have done the loop and can work out total tabs and can get to any one of them from the start.

Link to comment
Share on other sites

Yeah I was considering that and tried it. Problem is that this app won't let me copy data from the textboxes that are within the Java app. It would make my life sooo much easier if I could. So getting info from the app into ME just isn't working. But for this particular solution the reverse tab seems to work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...