I'm building a C# application that will enter my username and password for an online email service (URL), but when I'm searching for the username and password text boxes, I can't locate them. I used Firefox's DOM inspector and saw that the text boxes are located in "class="anonymous-div". Only when I choose to just open the frame, only then I can get the required text boxes. My question is - Is it possible to retrieve the text boxes via the webbrowser control if they are "hidden" under an anonymous div?
Asked
Active
Viewed 218 times
0
-
You need to obtain the frame's document first, and then you can access elements inside it. A similar question: http://stackoverflow.com/a/20874259/1768303. – noseratio Jan 26 '14 at 05:02
-
@Noseratio, I tried the above method: I get only 3 frames and each frame throws an "System.UnauthorizedAccessException" when trying to access it. When I tried the hack to bypass this exception (http://stackoverflow.com/a/19670135/1645196), I couldn't the frame as only 1 frame was returned. – ocp1000 Jan 26 '14 at 17:09
-
Use the `IOleContainer` approach to bypass x-domain security: http://stackoverflow.com/a/3597954/1768303 – noseratio Jan 26 '14 at 20:32