this is to extract just this text - “RO874232” ahead of TaxID in webpage.
command - Clientinfo.Substring(Clientinfo.Indexof("TaxID: ") + "TaxID: ".Length).split(Environment.NewLine.ToCharArray)(0)
where Clientinfo is the output of get text activity which is selecting the whole block.
Indexof gives the starting index of the TaxID , I mean, the starting character position,
TaxID length represents the number of characters in the string TaxID… So,
we are giving the index as the starting of TaxID + length of TaxID , so it will start with the actual value we need.
Then split (newline) represents to split the text upto the next new line character and then (0) represents before the new line. If we give it as (1), it will gives us after the new line
can you elaborate this part -
Then split (newline) represents to split the text upto the next new line character and then (0) represents before the new line. If we give it as (1), it will gives us after the new line
I mean, it will split the string based on the new line character
for example,
This is the first line and this is second
If this is the texxt you have and if you split it as text.split(Environment.Newline), it will store the first line and second line in an array of type string
so, if you want first line, text.split(Environment.Newline)(0) will give you the first line and
text.split(Environment.Newline)(1) gives the second
Hello @HareeshMR I am using the same exact code… trying to remove the same data but I am getting an error that “‘Environment’ is not declared”. Any idea why?