Closed seanuleh closed 4 years ago
Hi @seanuleh
Thanks for filing an issue, I need to look at my time when I can fix this, but if you already have time please do
Made a small change to the regex which parses the UA to support the new iPadOS User Agent strings. Added some superficial test case, could probably do with proper data for newer iPad devices, but unsure where to attain this information.
Thanks @seanuleh
I've merged it, will release it soon
Hi @seanuleh
I've release a new version https://github.com/wswebcreation/wdio-image-comparison-service/releases/tag/v1.13.1, can you verify and close the issue if it's fixed, thanks for your support
Looks like it's working now! thanks for the quick release.
Environment (please complete the following information):
Config of the automation framework + plugin Testing on BrowserStack - capability looks like this:
capabilities: [ { 'bstack:options' : { "osVersion" : "13", "deviceName" : "iPad 7th", "realMobile" : "true", "local" : "false", }, "browserName" : "[iOS] iPad 7th", } ],
Describe the bug calling check* (e.g. checkScreen()) functions fail due to this library not being able to determine the majorVersion in the getIosStatusAddressToolBarHeight function
To Reproduce execute any check* function with the wdio-image-comparison-service for a newer ipad device (ipad pro 2nd or ipad 7th) with browser stack.
Expected behavior the check* functions should not fail.
Log
Additional context The problem seems to be in this line here: https://github.com/wswebcreation/webdriver-image-comparison/blob/9ea2e22feea1cd35718d9b55eb0b9d03bb001eda/lib/clientSideScripts/getIosStatusAddressToolBarHeight.ts#L9
The regex fails for newer ipad devices and the subsequent line which extracts the major version fails. If I modify the major version to 13 then the library works as expected. I am unsure how to retrieve the values of navigator.appVersion to re-write the regex as a solution myself.