'how to get inner text of message from web page?
I'm using below code to intract with the POP-Up/Message from webpage.
hWND = FindWindow(vbNullString, "Message from webpage")
hWND <> 0 Then childHWND = FindWindowEx(hWND, ByVal 0&, "Button", "OK")
If childHWND <> 0 Then SendMessage childHWND, BM_CLICK, 0, 0
The POP up displays a value, such as "CGPA : 10", I wish to save that text ("CGPA : 10") in a variable.
I'm coding in VBA.
Solution 1:[1]
Might suggest getting something either like Selnium or Playwright that will drive and test web based application. The main problem i'm seeing you are doing FindwindowEx and the native Win32 api's are for Win32 native apps and not web applications as Selenium and Playwright are. Either of them would be the right way to go.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dano |
