This is a migrated thread and some comments may be shown as answers.

Handling URL in NavigateTo

2 Answers 109 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Amit
Top achievements
Rank 1
Amit asked on 20 Apr 2013, 08:01 AM
Hi,

I have following scenario:

1. Open Mail
2. Copy URL from mail (Link is disabled in mail so can't click to open)
3. Paste in in new browser and work

I am able to extract the url but passing it new browser is sometime failing due to characters like %3d. I am using following code:

1. Extracted variable : StagingLink
2. Link=GetExtractedValue("StagingLink");

 3.        Manager.LaunchNewBrowser(BrowserType.InternetExplorer, true);
            Browser ie = Manager.ActiveBrowser;
            ie.NavigateTo((string)ViewMail.Link,true);

Here part of URL where "%3d" is present is changed to "="  during string conversion so not working. Please help


2 Answers, 1 is accepted

Sort by
0
Amit
Top achievements
Rank 1
answered on 20 Apr 2013, 08:32 AM
Making following change worked:

ie.NavigateTo((string)ViewMail.Link,false);

Thanks,
Amit
0
Velin Koychev
Telerik team
answered on 23 Apr 2013, 01:42 PM
Hi Amit,

I am glad to hear that your issue has been resolved.

You are using NavigateTo(string url, bool useDecodedUrl = true) method.  You have to set useDecodedUrl = true  if you need to decode the url before navigate to it. In your case it seems to be the right decision to set it to false. 

Kind regards,
Velin Koychev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Amit
Top achievements
Rank 1
Answers by
Amit
Top achievements
Rank 1
Velin Koychev
Telerik team
Share this question
or