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 following ways:
If you are using the BrowserStack SDK, add the following snippet to your browserstack.yml
file:
Add the following snippet to your test scripts:
bsLocalArgs.put("f", "/my/awesome/folder");
bs_local_args = { 'key': '<browserstack-accesskey>', 'f': '/my/awesome/folder' }
bsLocalArgs.Add(new KeyValuePair<string, string>("f", "/my/awesome/folder"));
$bs_local_args = array("key" => "<browserstack-accesskey>", "f" => "/my/awesome/folder");
bs_local_args = { "key": "<browserstack-accesskey>" , "f": "/my/awesome/folder" }
bs_local_args = { "key" => "<browserstack-accesskey>" , "f" => "/my/awesome/folder" }
my %bs_local_args = ("key" => "<browserstack-accesskey>", "f" => "/my/awesome/folder");
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:
- Log in to BrowserStack and go to your account settings.
- Find “Local Folder URL” on the settings page and copy it.
- 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
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!