Skip to content

Test fails when device is set to lower resolution #4

Description

@Silverdimond

Tested on Galaxy S23 Ultra, if the display is set to 1080p or 720p it fails to parse the resolution

Connected to dm3qxxx

Battery stats reset.
Testing browser firefox...
Traceback (most recent call last):
  File "/home/silver/browser-power-hour/browser-power-hour.py", line 262, in <module>
    test_app(device, app, args.iterations, args.speedometer_timeout)
  File "/home/silver/browser-power-hour/browser-power-hour.py", line 152, in test_app
    search_bar = get_coordinate_string(device, browser_data["searchbar"])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/silver/browser-power-hour/browser-power-hour.py", line 134, in get_coordinate_string
    height = int(dimensions[1])
             ^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '3088\nOverride size: 1080'

Seems to work fine at the native resolution

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions