Can anyone please give me some idea that how to store username and password to a variable which is in the notepad file?
I saw one Topic regarding this like how to store a specific text but in my case I don’t know how to store username and password …I mean I want to know the expression…
In one topic they have stored invoicedate and invoice number in the assign activity like this:
InvoiceDate= System.Text.RegularExpressions.Regex.Match(Result,“(?<=(Invoice Date:)).“).Value
InvoiceNumber =System.Text.RegularExpressions.Regex.Match(Result,”(?<=(Invoice Number)).”).Value.
I have tried but am not getting any idea…so I want to know the expression like this… which one should I want to replace?
Can you show us the structure of the content of the text file?
for trial I have simply given like:
But I want like it should accept any characters…both for username and password.
I think @Pablito’s answer will work for your scenario
Is this for both username and password?
Yes it is. The expression is taking both. Then each one (username and password) is kept in separate group. As you see in my example I’m taking username by using (0) index and password by (1).
Instead of passing both in writeline I want to pass in Type into activity…for that how should I want pass?
Well… actually the same.
Simulate Type attribute.
But it is throwing error like regex is a type cannot be used as an expression…
In my example “regex” is an output attribute from matches activity. You need to set it in your project accordingly.
I did the same but now it Is throwing error in type Into activity that “object reference not set to the instance of an object”?
Actually am new to Ui path so that why am asking these much questions.
Your output from
Matches activity should refer to the actual variable. See my screen above.
Yes I have given the same…as you did…again it Is throwing the same error…in matches input “text” is the output from read text file right?
yeah I have given correct inputs and outputs…
Can you show your workflow? If any sensitive data is there, please just remove it.
Trial.xaml (8.8 KB)
Here in read file text you give your notepad file path and in open browser activity you give any url having “login page” consisting of Username and Password alone.