Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
remove comment outted lines
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Mar 1, 2019
1 parent c69cc68 commit 4fb91b9
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions lib/basedriver/commands/find.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,24 +357,7 @@ helpers.getScreenshotForImageFind = async function (screenWidth, screenHeight) {
// of coordinates returned by the image match algorithm, since we match based
// on the screenshot coordinates not the device coordinates themselves. There
// are two potential types of mismatch: aspect ratio mismatch and scale
// mismatch. we need to detect and fix both

// const screenAR = screenWidth / screenHeight;
// const shotAR = shotWidth / shotHeight;

// if (screenAR === shotAR) {
// log.info('Screenshot aspect ratio matched screen aspect ratio');
// } else {
// log.warn(`When trying to find an element, determined that the screen ` +
// `aspect ratio and screenshot aspect ratio are different. Screen ` +
// `is ${screenWidth}x${screenHeight} whereas screenshot is ` +
// `${shotWidth}x${shotHeight}.`);
// shotWidth = shotWidth / (shotAR / screenAR);
// log.warn(`Resizing screenshot to ${shotWidth}x${shotHeight} to match ` +
// `screen aspect ratio so that image element coordinates have a ` +
// `greater chance of being correct.`);
// imgObj = imgObj.resize(shotWidth, shotHeight);
// }
// mismatch.

// Resize based on the screen dimensions only if both width and height are mismatched
// since except for that, it might be a situation which is different window rect and
Expand Down

0 comments on commit 4fb91b9

Please sign in to comment.