Current time: 11-17-2019, 05:06 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chrome command line parameters
11-17-2015, 01:40 AM
Post: #1
Chrome command line parameters
I'm trying to override DNS while running a test. With my local Chrome, I can do that with the following command line:
chrome.exe --host-rules="MAP my.host.com 100.101.102.103" http://my.host.com/path

To do the same thing in webpagetest, I set "Command-line" (in the "Chrome" tab) to '--host-rules="MAP my.host.com 100.101.102.103"'. However, I then get an error message:
Invalid command-line option: "100.101.102.103""

Seems like the validation of command line parameters is not allowing spaces in parameters.
Is that a bug, or maybe an intentional protection against security problems?
Is there any other way to override DNS?
Find all posts by this user
Quote this message in a reply
11-20-2015, 04:11 AM
Post: #2
RE: Chrome command line parameters
Try using the script tab with your test and use this:

usage: setDns <host name> <IP Address>
example: setDns http://www.aol.com 127.0.0.1

<host name> - Host name for the DNS entry to override
<IP Address> - IP Address for the host name to resolve to
Find all posts by this user
Quote this message in a reply
11-26-2015, 06:26 PM (This post was last modified: 11-26-2015 07:56 PM by frankf.)
Post: #3
RE: Chrome command line parameters
Great, that approach solved my problem. Thanks for the hint!

For the benefit of other non-expert users - the script that does it for me is:
Code:
setDns    www.mytestedhost.com    123.234.123.234
navigate    http://www.mytestedhost.com/path/
(with the separators being tabs)

[post edited: use "code" formatting to prevent the forum from adding http in front of the DNS name]
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)