views:

27

answers:

1

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?

+1  A: 

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.

Samuel