Wildcards for selectors

Hi,

I just want to ask how to get the numbers of records in this system possible output are (No Records, 1 Record, 400 Records) it depends on the patch panel I’ve searched but upon using the wildcard still I cannot get the # of records. See below:

image

This wildcard only applicable if the results are “No Records” and more than 1 results e.g “400 Records” but how about if there is only 1 result “1 Record” in the system it does not have letter “s”

Hi @rtablate

Create a counter variable where it is used to increement the counter

Thanks
Ashwin S

How does it works? Thanks.

Hi @rtablate

Create a while condition to loop the values along with that you can fetch the records and pass the counter variable in the selector as CounterRecords

Thanks
Ashwin S

May i know from where we are trying to get the record count
Is that a table or any list of values
Cheers @rtablate

Hi, if you are using get text activity
Can you Please show me the element (text) area where you are getting the text

Yup I am using the text activity with the selector above this is the screenshot of the systems which I am trying to get its either (No Records, 1 Record or 400 Records) with this format.

This is only a DIV using the get text but the value may be different depending on the result format for No and Many results it has a letter “s” (No Records, 400 Records) but with 1 result the format is (1 Record) so I’m having hard time on the wildcards.

replace the s in records with a “?” single character wildcard

1 Like

Yup! this is working if the results are (No Records and e.g 400 Records) but having an error if there is (1 Record) found.

image

Hi, use anchor base activity
Inside the anchor base
At left side use ‘Find element’ as anchor , and show the element “all” dropdown
And use get text activity for the records text as base at inside the right side of the anchor base activity

For your checking. my only problem is the word “Record” changed depending on the results and wildcards cannot fully utilized.

No Records and 400 Records
1 Record

See below what’s next based on your suggestion:

@rtablate

‘*Record?’ give it a try :slight_smile:

Not working. Any other workaround?

image

Hi, you got confused
pls use find element for the field with “all”
That might be having valid selector
And base as get text for records

In this case tool will take “all” drop down field as reference and get the text from the records

You no need to give any selector for get text as the base

Upon clicking the ALL button it has a dropdown.

What is the next step?

You can give string variable as output for the get text activity
That variable will give you the records text

use write line with above variable as input , just try run the code to check if the get text is getting records text or not

Still getting error. To summarize what I need is to get the No. of records available (either 1 or more, No). See different format of the text element in the html.

I try different combination of wildcards to get possible input:

  • Record
  • Record?
  • Record*
  • Recor*

May i know what error you got ?

Because what I’m trying to get on this data is “No Records” and my wildcards used only on the 1st character without checking the letter “s”.

image