Created
January 14, 2021 00:22
-
-
Save jtarchie/793b904d4f7c1b5cb0791e6d3a6dc15d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function e(name) { | |
var e = document.createEvent('HTMLEvents'); | |
e.initEvent('name', true, false); | |
return e; | |
} | |
var element = $$("span[title='View']")[0] | |
element.dispatchEvent(e("contextmenu")); | |
element = $$("div[data-automation-id='ciewPrintableVersion']")[0] | |
element.dispatchEvent(new PointerEvent('pointerdown')); | |
element.dispatchEvent(new PointerEvent('pointerup')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment