Handling URL in NavigateTo

3 posts, 0 answers
  1. Amit
    Amit avatar
    11 posts
    Member since:
    Feb 2013

    Posted 20 Apr 2013 Link to this post

    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. Amit
    Amit avatar
    11 posts
    Member since:
    Feb 2013

    Posted 20 Apr 2013 Link to this post

    Making following change worked:

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

    Thanks,
    Amit
  3. Velin Koychev
    Admin
    Velin Koychev avatar
    88 posts

    Posted 23 Apr 2013 Link to this post

    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
Back to Top