Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Invoking Button Click On Webpage causes stack overflow

Okay i have a winforms application and i am trying to automatically login with my details to paypal on the click of a button,
The correct email:pass is passed to the login form, But when the btnLogin is invoked it throws me a Stack Overflow error and the webpage doesn't load.

Here's my code:
Code
   Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
       WebBrowser1.Document.GetElementById("login_email").SetAttribute("value", TextBox1.Text)
       WebBrowser1.Document.GetElementById("login_password").SetAttribute("value", TextBox2.Text)

       WebBrowser1.Document.GetElementById("btnLogin").InvokeMember("click")
   End Sub

Any help is appreciated thanks ;)

EDIT: I don't believe it's my code as i tried just clicking the login button on the browser non-programatically and it didn't work either :(
Try setting the FEATURE_BROWSER_EMULATION registry key. More info on that here:
https://blogs.msdn.microsoft.com/patrick...atibility/
(Dec 1, 2017 07:30 PM)Ninja Wrote:  Try setting the FEATURE_BROWSER_EMULATION registry key. More info on that here:
https://blogs.msdn.microsoft.com/patrick...atibility/

Didn't work either, I don't believe it's me or my PC, Possibly the site i'm trying to automate. Login works with google ect but not this site.
(Dec 2, 2017 08:48 AM)Owl Wrote:  Try an alternative browser control such as gecko or awesomeium.

Sounds like a good solution, I'll have to check if they're compatible with 4.5.2 framework


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by The Pulp FictionApr 24, 2022 12:22 AM 2 198 Apr 24, 2022 12:22 AM
Last Post: The Pulp Fiction
[.NET] by triplextremeSep 15, 2020 02:29 PM 7 220 Sep 15, 2020 02:29 PM
Last Post: Dredd
[.NET] by Formula 1Feb 28, 2019 02:31 PM 2 188 Feb 28, 2019 02:31 PM
Last Post: Formula 1