开发者

Is there a way to extract the message from a JavaScript dialog in Chrome?

开发者 https://www.devze.com 2022-12-25 02:04 出处:网络
I’ve been working on an extension for automating tests in Chrome, and I came across an obscure issue with JavaScript dialogs.The message shown in the dialog can’t be readily retrieved/copied. I’ve

I’ve been working on an extension for automating tests in Chrome, and I came across an obscure issue with JavaScript dialogs. The message shown in the dialog can’t be readily retrieved/copied. I’ve used the GetWindowText and InternalGetWindowText functions, but they only return the title of the dialog and the text from the buttons, not the actual message itself.

I even looked at programs that extract text from forms, but no luck. So does anyone know of a way to retrieve the text from these JavaScript开发者_运维问答 dialogs in Chrome?


Update: For future reference, I already found a solution. I send the key combination "Ctrl+c" to the dialog, and retrieve the text via the clipboard.

0

精彩评论

暂无评论...
验证码 换一张
取 消