Assignment 3

hi
am working on assignment 3
in this need to use on element appear to get confirmation id while uploading the files but when i use it couldn’t work the whole web browser getting selected or as i attached its getting selected.


what is the way to get this ID ?

Try using Get text activity.

Hi @naveen19

Well you will be better off using internet explorer for this assignments.

used get text activity too same issue am facing :frowning:

bro !

have 've developed more than 50% if i use IE need to do from 1st.
can u suggest any other way!

Hello @naveen19,

I have encountered this issue whenever i have to deal with an alert box in chrome.
So now, i try developing my workflow in IE if there is an alert box upcoming in workflow.

I developed my this assignment in chrome too. After struggling i ended up with this solution.

  • Use an Element Exists activity to check if the alert box exists.
  • set the selector as follows:
  • If this element exists i.e. alert box exists then use Send hotkey and key as ‘enter’.

The selector will not be valid, but it still works for me. Attaching ss

Also, if this doesn’t works you can try this:

  • Use Get Full Text Activity on the alert screen
  • check for the String to be present in the output string using string.Contains(“your string”) (You can check for existence of ‘Report was uploaded’ in your case)
  • If the value is true use Send Hotkey with key as ‘enter’

Let me know if any of these works for you.

Thanks,
Chandan

hi Chandan


as u said i did
u meant the send hot key (enter) is to clickok button of alert box right!
but its not working may i use click image instead of the send hot key!!
and by this how can we get a confirmation id?

And when using the get full text activity also it tough to capture the alert :frowning:


may i capture as like this and change the selector as u said!!!

Hi @naveen19

Yes!! the Send hotkey was to click the ‘ok’ button of alert box.
Now since this does not work for you.

Try the second alternative i suggested.

  • On the Alert screen try using Get Full Text activity.
    (Now this will be tough as you said, because when you start ‘Indicating on screen’ for Get Full Text activity, the UiPath slows down. Wait for a moment, when the selection area comes on as in your second screen shot. select that screen.)
  • This activity will fetch all the text from the screen and according to that you can work further as i had described earlier.

To get the confirmation code follow this:

  • Use Matches activity on the extracted string from Get Full Text to to get the confirmation id.
    (In my case the Id was between “id is” and “OK” string)
  • Use "(?<=" + "id is" + ")(.*?)(?=" + "OK" + ")" in Pattern properties of Matches activity. (It will result the string between two strings specified)

If nothing works, do share your .xaml file. We will get it fixed.

bro its working, but confirmation id not geting split


how to use substring on this !!

Great…

Sorry, my bad. I did not explain the Matches part completely.
Follow these steps excatly:

  • Now since the extracted result has data in different lines. we have to remove the new line component. Use Assign activity to clear new line String.Replace(vblf,“”)
  • Now all the data is in single line. According to screen shot your confirmation id is between the Strings, “id is” and “OK”
  • Use the Matches activity to get the confirmation id.
  • Use "(?<=" + "id is" + ")(.*?)(?=" + "OK" + ")" in Pattern properties of Matches activity.
  • The result generated from this activity is IENumerable.
  • Use assign activity to Fetch the result as follows: Result(0).Value

Follow the screen for clear picture.
workflow

thanks,
chandan

hi i felt this matches is little tough :frowning: since am new to programming. thats why asked how to do substring!
have used index of and length but dono to combaine both of this :frowning:


image

hey @naveen19

use this,

ChromeExeAcme.Split({"Report was uploaded - confirmation id is"},System.StringSplitOptions.None)(1).Trim.Split(System.Environment.Newline(0))(0).Trim

Copy this in Write Line activity.
this will result only the id from the string extracted.

Cheers :beer:

Thank you so much :blush::pray: 3days struggling in this

1 Like

Do get help from community if you are struggling further.
Happy Automating :v:

1 Like

What is “ChromeExeAcme.” here. is it the browser element?

@FebinKAndrews

Nope

It is a string used by @naveen19 in his workflow.

You can use your own StringName there.

this code above :point_up_2: returns string a string present between “Report was uploaded - confirmation id is” and Newline in the Specified String(ChromeExeAcme in this case).

OK. Thanks . But , how this string loaded with the text from pop up message?. reading chrome pop up message is very difficult. - isnt he using chrome ??

yes you are correct.
It is difficult to deal with pop up message in chrome.
And he is using chrome

But you can use Get Full Text avtivity to read the alert message. It does not harm the process speed or time.
It is difficult only while developing, it is smooth while executing.

1 Like

hmm- Thanks alot. I[quote=“chandu4712, post:18, topic:92969, full:true”]
I thought there a way to extract the pop up text directly from the browser element - thanks for clarification

2 Likes

Yes , its output variable name of browser :slight_smile: