Test HTML Design Folder/Directory

You can test your HTML files (like newsletters or static campaign pages) with Local Testing, using --folder capability.

To enable this option, establish the Local Testing connection using one of two ways:

Via language bindings

Add the following snippet to your test scripts:

bsLocalArgs.put("f", "/my/awesome/folder");
bsLocalArgs.put("f", "/my/awesome/folder");
bsLocalArgs.put("f", "/my/awesome/folder");
bsLocalArgs.put("f", "/my/awesome/folder");
bs_local_args = { "key": "<browserstack-accesskey>" , "f": "/my/awesome/folder"}
bs_local_args = { "key" => "<browserstack-accesskey>" , "f" => "/my/awesome/folder"}
bsLocalArgs.put("f", "/my/awesome/folder");

Via command-line interface

Use the --folder flag while establishing a Local Testing connection, along with the absolute path of your HTML folder/directory.

Run the binary using the following command:

./BrowserStackLocal --key YOUR_ACCESS_KEY --folder <absolute_path_to_html_folder>
BrowserStackLocal.exe --key YOUR_ACCESS_KEY --folder <absolute_path_to_html_folder>

The remote browsers will now be able to access your HTML files and render them when the test script requests the Local Folder URL. Your Local Folder URL will be formatted as: http://username.browserstack.com.

You can also find your account’s Local Folder URL by following the steps below:

  1. Log in to BrowserStack and go to your account settings.
  2. Find “Local Folder URL” on the settings page and copy it.
  3. Use the Local Folder URL in your test script.

Note: Local Folder URLs can only be accessed by BrowserStack remote machines.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked

Thank you for your valuable feedback