Using various ABM methods, I am getting some curious results with some - affecting my code to handle different device layouts.
The following examples shows results from phone, tablet and desktop:
Here is the phone log results. Everything looks fine with this...
ABM.GetBrowserWidthHeight(page) - Actual Screen Width: 360 and Height: 518
---
page.GetCurrentPageSize result: phone
page.Isphone result: true
page.IsTablet result: false
page.IsDesktop result: false
---
Here is the tablet results:
Page.GetCurrentPageSize states the screen / device is "initial" (and not Tablet). What the heck is an "initial"
Trying to use this method - on a tablet will not provide the proper layout for the login form (which is altered based on device detected).
ABM.GetBrowserWidthHeight(page) - Actual Screen Width: 962 and Height: 482
---
page.GetCurrentPageSize result: initial
page.Isphone result: false
page.IsTablet result: true
page.IsDesktop result: false
---
Here are results from desktop where the browser is resized to simulate different devices:
Browser window shrunk to simulate phone.
The page.GetCurrentPageSize result - states "phone", but the page.IsDesktop result states "true"
ABM.GetBrowserWidthHeight(page) - Actual Screen Width: 483 and Height: 533
---
page.GetCurrentPageSize result: phone
page.Isphone result: false
page.IsTablet result: false
page.IsDesktop result: true
---
Browser window shrunk to simulate tablet:
Same issue - correct currentpagesize, but still states - isDesktop = True...
ABM.GetBrowserWidthHeight(page) - Actual Screen Width: 921 and Height: 716
---
page.GetCurrentPageSize result: tablet
page.Isphone result: false
page.IsTablet result: false
page.IsDesktop result: true
---
Browser window expanded to simulate desktop:
This is all fine...
ABM.GetBrowserWidthHeight(page) - Actual Screen Width: 1678 and Height: 960
---
page.GetCurrentPageSize result: desktop
page.Isphone result: false
page.IsTablet result: false
page.IsDesktop result: true
---
Thanks for input...