Can I launchBrowser with a url with parameters?

Comments

13 comments

  • Avatar
    Domay

    Ended up having to use:

    <runProgram>
    <program>explorer.exe</program>
    <programArguments>"https://hello.world.com/index?page=content&amp;id=12345" &amp;</programArguments>
    <ruleList>
    <isTrue>
    <value>${viewAdditionalInfoDC}</value>
    </isTrue>
    </ruleList>
    </runProgram>
    0
    Comment actions Permalink
  • Avatar
    michiel

    Could you tell us which Windows version you are using?

    0
    Comment actions Permalink
  • Avatar
    Domay

    Windows 7 Professional

    0
    Comment actions Permalink
  • Avatar
    BitRock support

    We have not been able to reproduce this issue on Windows 7. Could you check if running your url from the Windows command line does launch the browswer?

     

    start https://hello.world.com/index?page=content&amp;id=12345

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Domay

    So if I run the command:

    start https://hello.world.com/index?page=content&amp;id=12345 

    I get the following error, although a browser does open with an invalid, truncated URL.

    'id' is not recognized as an internal or external command,operable program or batch file. 

    If I run the command (wrapping the URL in quotes):

    start "https://hello.world.com/index?page=content&amp;id=12345" 

    I get the same thing I was seeing, which is a new console window opening up with the title as the url rather than the normal title of "Command Prompt".

    0
    Comment actions Permalink
  • Avatar
    BitRock support

    The url has the &amp; xml escape characters, can you replace them with just and test it again?

     

    start "https://hello.world.com/index?page=content&amp;id=12345" 
    0
    Comment actions Permalink
  • Avatar
    Domay

    Sure, running:

    start "https://hello.world.com/index?page=content&id=12345" 

    Opens a new windows console with whatever I put within those quotes as the title of the console window, rather than the normal title "Command Prompt". Changing the `&amp;` to `&` simply changes the title's string accordingly.

     

    0
    Comment actions Permalink
  • Avatar
    michiel

    We can't reproduce this issue. Could you try with

    start www.google.com
    0
    Comment actions Permalink
  • Avatar
    Domay

    Yup, that works:

    start www.google.com

    And if I add just 1 parameter, that works too:

    start www.google.com?page=blah

    But if I add 2 parameters, I get an error, because the ampersand separates the command into two commands:

    start www.google.com?page=blah&content=meh
    'content' is not recognized as an internal or external command, operable program or batch file.

     

    0
    Comment actions Permalink
  • Avatar
    michiel

    Could you check if using quotes would work?

    start "www.google.com?page=blah&content=meh"

     

    0
    Comment actions Permalink
  • Avatar
    Domay

    I've already checked that - using quotes does not work. Using quotes opens another windows command prompt, but the normal title of the window "Command Prompt" is replaced by whatever happens to be inside those quotes. 

    0
    Comment actions Permalink
  • Avatar
    BitRock support

    Could you escape the ampersand characters as (^&)?

     

    start www.google.com?page=blah^&content=meh
    0
    Comment actions Permalink
  • Avatar
    Domay

    That works! Escaping the ampersand like that works just fine:

     

    start www.google.com?page=blah^&content=meh
    1
    Comment actions Permalink

Please sign in to leave a comment.