Skip to content

Commit

Permalink
Update maestro-orchestra/src/main/java/maestro/orchestra/Orchestra.kt
Browse files Browse the repository at this point in the history
Co-authored-by: Dan Caseley <dan@caseley.me.uk>
Co-authored-by: Amanjeet Singh <amanjeetsingh150@gmail.com>
  • Loading branch information
3 people committed Jan 4, 2025
1 parent 4da9bbe commit f8c3a97
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions maestro-orchestra/src/main/java/maestro/orchestra/Orchestra.kt
Original file line number Diff line number Diff line change
Expand Up @@ -819,12 +819,16 @@ class Orchestra(
?.let { File(it, pathStr) }
?: File(pathStr)

if(cropped == null){
if (cropped == null) {
maestro.takeScreenshot(file.sink(), false)
}else{
} else {
maestro.takePartialScreenshot(sink = file.sink(), bounds = cropped.element.bounds, compressed = false)
if (cropped == null){
maestro.takeScreenshot(file.sink(), false)
} else {
maestro.takePartialScreenshot(sink = file.sink(), bounds = cropped.element.bounds, compressed = false)
}
}

return false
}

Expand Down

0 comments on commit f8c3a97

Please sign in to comment.