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:
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");
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:
Note: Local Folder URLs can only be accessed by BrowserStack remote machines.
Contact our Support team for immediate help while we work on improving our docs.
Contact our Support team for immediate help while we work on improving our docs.
Thank you for your valuable feedback!