Ask Your Question
2

What are the steps to configure Charles proxy in the WebDriver IO Mocha automation framework?

asked 2023-07-11 13:41:18 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-07-11 14:06:02 +0000

ladyg gravatar image

Assuming you have already installed Charles proxy and WebDriver IO Mocha automation framework, follow these steps:

  1. Start Charles proxy and make sure that it is running on your local machine.
  2. In the WebDriver IO configuration file, add the following code to set the proxy settings:
// Set Charles Proxy settings
exports.config = {
  ...
  capabilities: [{
    browserName: 'chrome',
    chromeOptions: {
      proxy: {
        proxyType: 'manual',
        httpProxy: 'localhost:8888' // replace with Charles proxy port number
      }
    }
  }],
  ...
}
  1. Restart your WebDriver IO test runner to apply the changes.
  2. Launch your test script and you should see the traffic being recorded in the Charles proxy window.

Note: If you have configured HTTPS requests in your test script, you may need to add SSL proxy settings to the Charles proxy configuration.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-11 13:41:18 +0000

Seen: 13 times

Last updated: Jul 11 '23