How to find particular element in the browser?

Hi All,

I have a question how to find the element in the browser and get the element values.

link: Home - eCourt India High Courts Services
Like example
In first image there is decision date and its value is in right side and get that value.

whereas in second image there’s no decision date and get the value as ‘Nil’

So if there’s a solution please let me know as soon as possible.

1 Like

Hi @SOURAV_KUMAR_DAS,
You can try using it as below.

  1. Take element exist and indicate the “Decision Date”
    (Make sure that, there should be aaname=‘Decision Date’ in your element exist selector if not then add it using Ui Explorer )
  2. if Above element exist gets True then add get text activity inside if block and indicate the value next to Decision date.

hope this will work for you!
Thanks!

2 Likes

Hi @SOURAV_KUMAR_DAS

Try with anchor base to fetch particular data

Anchor base Activity
https://docs.uipath.com/activities/docs/anchor-base

Hope this will help you.

Regards,
Manikandan

1 Like

Hi Deepak94 Sir,

I have already used element exist but it returns error to me and so that I have used image exists but also it’s not working.

Hi Manikandan.T Sir,

I have used Anchor base activity where it didn’t work as it thrown Anchor base was timed out.

Try to use Indicate anchor while indicate element in the browser within the Ui Explorer in Edit selector.
Make it as a dynamic selector.

Hi Manikandan.T Sir,

I can’t get it out your reply sir…

Fine
–you were almost done
–use TRY CATCH activity where in the TRY BLOCK use ANCHOR BASE activity
–where in the left side of anchor base activity use FIND IMAGE activity and choose that “DecisionDate” as a image and in the right side use SCREEN SCRAPPING method like use GET OCR TEXT method or GET TEXT method, and get the output with a variable of type string named str_input
–now use a WRITE LINE activity and mention as str_input.ToString

and if that fails like there is no DecisionDate field in that page this above ANCHOR BASE activity will fail and it goes to CATCH block where we can return value as “Nil” using a assign activity
str_input = "Nil"

Kindly try this and let know for any queries or clarification
Cheers @SOURAV_KUMAR_DAS

2 Likes

While indicating the selector
Click on Edit selector and select the anchor by using Indicate Anchor Within the Ui Explorer itself its need not to use anchor base activty separatly.

1 Like

Hi Palaniyappan Sir,

At catch block I am unable drop the activity…

1 Like

fine
press esc button three to four times and then try dragging activities from activity panel and insert them within CATCH Block
Cheers @

1 Like

Hi Palaniyappan Sir,

Ok Sir.

Hi Palaniyappan Sir,

What type of exception i need to include in the catch block Sir?

1 Like

the exception type would be
System.Exception

Cheers @SOURAV_KUMAR_DAS

1 Like

Hi Palaniyappan Sir,

Is it IO Exception Sir…?

no buddy
just this
image

Cheers @SOURAV_KUMAR_DAS

1 Like

Hi Palaniyappan Sir,

Oh Ok Sir.

Hi Palaniyappan Sir,

The next hearing date has returned as decision date Sir, it didn’t return as nil.

1 Like

Fine
May I know What was mention in the assign activity inside the CATCH block
Cheers @SOURAV_KUMAR_DAS

1 Like

Hi Palaniyappan Sir,

below is the image Sir.

image