Current time: 12-16-2017, 07:37 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
setViewportSize is not working
03-23-2017, 07:10 AM (This post was last modified: 03-23-2017 08:30 AM by sadhikari.)
Post: #1
setViewportSize is not working
Hi Patrick,

Recently I have noticed that setViewportSize does not set the browser size to defined dimensions. It starts the test in the default browser window size no matter what the setViewportSize is set. I tried updating the agents to latest but still does not work in my private instance. Is this a known issue? I also tried running the test in public site with setViewportSize, it does not seem to resize the browser to the defined dimensions.

Here are couple of test I have tried in public instance with setViewportSize 300 600. Both the result show the browser size as 929x1047.

https://www.webpagetest.org/result/170322_TV_1E94/
https://www.webpagetest.org/result/170322_T3_1E8X/

Thanks
Find all posts by this user
Quote this message in a reply
03-23-2017, 11:14 PM
Post: #2
RE: setViewportSize is not working
There aren't any currently tracked issues on it, would you mind opening one? https://github.com/WPO-Foundation/webpagetest/issues

FWIW, setting the viewport size is a bit of a race at the start of the test where it has to launch the browser, measure the viewport, resize the window and give it enough time to actually resize before starting the test. It's possible that one of the steps in that sequence broke.

Setting the browser size is significantly more reliable if you can do that instead (size of the full browser window itself) since that can be done immediately at startup with no measurement loop.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-23-2017, 11:15 PM
Post: #3
RE: setViewportSize is not working
Oh, also if you are emulating a mobile device (which 300x600 sounds like) then using Chrome and the mobile emulation should give you consistently the requested viewport because it is set in the browser explicitly.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-24-2017, 04:34 AM
Post: #4
RE: setViewportSize is not working
Thanks Patrick. I have opened the issue in github
https://github.com/WPO-Foundation/webpag...issues/853

Also 300x600 is just to try whether setViewportSize is working correctly or not at least for this time :-). I will change my framework to use mobile emulation instead of relying on setViewportSize.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)