How to compare two URL's which is stored in two different variables

Hello guys, here is my topic.

I want to compare two URl’s with large length for ex:-

i explain what i done
First i get the URL by using Get Attribute and store it in a variable called GetUrl,
i compare it in if condition
if GetUrl=BaseUrl (
Show Message box(in if)
Show Message (in else)

but it fail to compare url’s and execute Else block…!!


This is what I do and it works for me.


Check it properly once. If one character is missing then it will go to else part only.

Show me screenshot of both variables once.


We have URI as a .net class with System.Uri.

– Create two variables with System.Uri datatype
– Then check this condition in a IF activity

Uri.Compare(UriBase, UriNew, UriComponents.Host Or UriComponents.PathAndQuery, UriFormat.SafeUnescaped, StringComparison.OrdinalIgnoreCase).ToString


1 Like