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.
精彩评论