stagehand PR review changes

Updates for the review of https://github.com/dart-lang/chromedeveditor/pull/3611 - @ussuri.

(this isn't critical to merge into M17)