How to search a text in a system interface and then click on it?

  • 25 September 2020
  • 3 replies
  • 4 views

Hi, i have copy a value example UMSIR-001, and would like to search this value in a system, then click on it.

Example:

25544iCAB361FD334A3A52.jpg

What is the function i can use to do a some kind of matching?

 

Thanks!


3 replies

Hi there,

 

How you do this depends on the type of application it is, and I can't exactly tell from your screenshot.

 

If you are using a web application you can use the Click on HTML object to simulate a click using Javascript. You may need to alter the selector to use a variable for the actual product name, but this is only available from v20.3 upwards. If you have a lower version and you know Javascript you may be able to use the Run Javascript command to work around this limitation in older versions.

 

If you are using a desktop application you can get the X and Y coordinates of an on-screen object using the Get UI Object Location AC, then use the Mouse Click AC to click on those coordinates.

 

If you are using visual automation (computer vision) you will have to record a step by clicking the product number and have to do this for each cover name as you cannot use variables with this.

Hi Darren,

 

Thanks for your reply.

The application is not web base, it is old system developed by Java (should be because this program is showing Java icon at the task bar).

 

You mentioned if for desktop application, after got the X and Y coordinates, then how i can search the value (assume i already have a variable $output$) of UMSIR? - something like "Find"?

Hi,

 

If this is Java, then the best way of interacting with this is actually in v20.3 where we have good support for interacting with Java tables. Older versions will have limited options here.

 

For desktop applications, the X and Y value is the screen location of the object after it is found, so at this stage you have already done the searching.

 

I'm sorry but I don't understand where this $output$ variable comes from. If the contents of $output$ is "UMSIR" and you wish to find this in the Java table this might not be possible, and you may have to find another solution. For example, filtering by that row first in the app itself, using a combination of keyboard shortcut and copy+check clipboard value to determine whether you are on the right row.

Reply