WebPagetest Forums

Full Version: setViewportSize broken?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Starting around March 6, setViewportSize stopped changing the resolution. We run private instances, but I've tested on your site and see the same issue.

Here are the results:
Here's the script:
setViewportSize 375 667
navigate http://whatismyscreenresolution.net/

Searching has turned up similar issues. The solution was to put a tab between the height and width but I don't believe that's the current issue. The script text field doesn't seem to take tabs, and when I click the yellow 'script' above the "Re-run the test" button it seem to have automatically added the tab.
setviewportSize is still broken but we've found a solution for the API call.

Our dev team had been calling the API with ...runtest.php?........&width=375&height=667. After searching through runtest.php I decided to change 'width' and 'height' to 'browser_width' and 'browser_height'. It works for us now. I'm not sure if it was broken before and never should have accepted height&width, or if they're being overwritten by the browser_height/browser_width variables.
I am also experiencing the same issue. It stopped changing the browser size. I use runtest.php POST call. Adding width and height or browser_width and browser_height did not fix the issue. It keep runs the test in default window size no matter what the width/height are provided or passing the dimensions from setViewportSize.
Reference URL's