How to set a mobile view at the start of the project?

  • Автор темы Автор темы bambinou
  • Дата начала Дата начала

bambinou

Client
Регистрация
22.08.2011
Сообщения
442
Реакции
21
Баллы
18
Hello
A.
I would like to set a mobile view at the start of the project but cannot find out how as this is not great:
instance.SetWindowSize (411, 731);

Is there a better way to tell the browser that this instance is from an android xl (example).
Thank you.
 
Is there a better way to tell the browser that this instance is from an android xl (example).
Yes, there is such a way.
Profile → Browser → Configure manually
And set the settings according to the mobile browser.

ZTMa5Y6.png
 
Thanks I tried that but it failed. Using this method do not help with the screen size and also the detection of a specific mobile view ie: Ipad Pro view, Ios view and so on.
I was hoping for a tool like the Chrome dev tool where you can set a view and work on that specific view.
 
After the profile is generated. The screen size of the device will be in the variables {-Profile.ScreenSizeWidth-} and {-Profile.ScreenSizeHeight-}. Therefore, in order to set the window size in accordance with the device, you need to execute this C # code:
C#:
Развернуть Свернуть Копировать
instance.SetWindowSize(project.Profile.ScreenSizeWidth, project.Profile.ScreenSizeHeight);

Do not forget to turn on the screen emulation option.

eKPcDHL.png
 
I see, excellent trick, thank you so much. Is there a way to trigger a specific device like Ipad pro? So your target believes you have an iPad?
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)