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.
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
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’
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
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.
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
hi i felt this matches is little tough 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
this code above 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.
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