jessezach / RobotEyes

Image comparison for Robot Framework
MIT License
75 stars 24 forks source link

Issue in Capture Full Screen when viewport is changed in chrome options #72

Closed tiwarishrijan closed 4 years ago

tiwarishrijan commented 4 years ago

Describe the bug I have created mobile simulation on browser by setting chrome options as below

${device metrics}=    Create Dictionary    width=${360}    height=${640}    pixelRatio=${3.0}    userAgent=Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19
${mobile emulation}=    Create Dictionary    deviceMetrics=${device metrics}
${chrome options}=    Evaluate    sys.modules['selenium.webdriver'].ChromeOptions()    sys, selenium.webdriver
Call Method    ${chrome options}    add_experimental_option    mobileEmulation    ${mobile emulation}
Create Webdriver    Chrome    chrome_options=${chrome options}

When i take screenshot using Capture Full Screen keyword it actually widens the whole screen due to which screenshot is scaled Example Image img1

jessezach commented 4 years ago

All web images are resized to a specific size in order to ensure that comparison is done between images of same sizes. Will add an enhancement to avoid resizing completely and implement another way to ensure sizes are equal before comparison.

jessezach commented 4 years ago

Fixed in https://github.com/jz-jess/RobotEyes/pull/73

jessezach commented 4 years ago

Fix has been released